Window: afterprint event

The afterprint event is fired after the associated document has started printing or the print preview has been closed.

Bubbles No
Cancelable No
Interface Event
Event handler property onafterprint

Examples

Using addEventListener():

window.addEventListener('afterprint', (event) => {
  console.log('After print');
});

Using the onafterprint event handler property:

window.onafterprint = (event) => {
  console.log('After print');
};

Specifications

Specification Status
HTML Living Standard Living Standard

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
afterprint eventChrome 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 46Safari iOS ? Samsung Internet Android ?

Legend

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

See also

Document Tags and Contributors

Tags: 
Last updated by: mdnwebdocs-bot,