JavaScript // イベントの設定 (onafterprint) window.onafterprint = function ( event ) { // ... } // イベントの設定 (addEventListener) window.addEventListener( "afterprint", function ( event ) { // ... } ) ; HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>【デモ】WindowEventHandlers.onafterprint - 印刷用のダイアログを閉じた時に発火</title> <link rel="canonical" href="https://syncer.jp/Web/API_Interface/Reference/IDL/
![WindowEventHandlers.onafterprint - 印刷用のダイアログを閉じた時に発火](https://cdn-ak-scissors.b.st-hatena.com/image/square/57609ef3e5a947c3c177f134bf8512ce2fc22e9a/height=288;version=1;width=512/https%3A%2F%2Fcdn.syncer.jp%2FWeb%2FAPI_Interface%2FReference%2Fopengraph.png)