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


Using addEventListener():

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

Using the onafterprint event handler property:

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


Specification Status
HTML Living Standard Living Standard

Browser compatibility

No compatibility data found. Please contribute data for "api.Window.afterprint_event" (depth: 1) to the MDN compatibility data repository.

See also

Document Tags and Contributors

Last updated by: mdnwebdocs-bot,