Nasi wolontariusze nie przetłumaczyli jeszcze tego artykułu na język Polski. Dołącz do nas i pomóż go przetłumaczyć!
Można także przeczytać artykuł w języku: English (US).

The onafterprint property of the WindowEventHandlers mixin is the EventHandler for processing afterprint events for the current window. These events are raised after the user prints, or if they abort the print dialog.

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, you should prefer the use of an @media print CSS at-rule, but it may be necessary to use these events in some cases.


window.addEventListener("afterprint", function(event) { ... });
window.onafterprint = function(event) { ... };


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

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung 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 ?


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

See also