Nossos voluntários ainda não traduziram este artigo para o Português (do Brasil). Junte-se a nós e ajude-nos a fazer o trabalho!
Você também pode ler o artigo em English (US).

The WindowEventHandlers.onafterprint property sets and returns the afterprint EventHandler for the current window.

Syntax

window.onafterprint = event handling code

Notes

The beforeprint and afterprint events allow pages to change their content before printing starts (perhaps to remove a banner, for example) and then revert those changes after printing has completed. In general content authors should prefer the use of an @media print CSS at-rule, but it may be necessary to use these events in some cases.

The afterprint event is raised after the user prints, or if they abort the print dialog.

Safari does not implement these events.

Specification

Specification Status Comment
HTML Living Standard
The definition of 'onafterprint' in that specification.
Living Standard  

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 63Edge Full support YesFirefox Full support 6IE Full support YesOpera Full support 50Safari No support NoWebView Android Full support 63Chrome Android Full support 63Edge Mobile Full support YesFirefox Android ? Opera Android Full support 50Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also

 

Etiquetas do documento e colaboradores

Última atualização por: Jonathan_Watt,