--- title: 'Window: afterprint イベント' slug: Web/API/Window/afterprint_event tags: - Event - Reference - イベント translation_of: Web/API/Window/afterprint_event ---
afterprint イベントは、関連する文書の印刷が開始されたか、印刷プレビューが閉じた後に発生します。
| バブリング | いいえ |
|---|---|
| キャンセル | 不可 |
| インターフェイス | {{domxref("Event")}} |
| イベントハンドラープロパティ | {{domxref("WindowEventHandlers/onafterprint", "onafterprint")}} |
addEventListener() の使用例:
window.addEventListener('afterprint', (event) => {
console.log('After print');
});
onafterprint イベントハンドラープロパティの使用例:
window.onafterprint = (event) => {
console.log('After print');
};
| 仕様書 | 状態 |
|---|---|
| {{SpecName('HTML WHATWG', '#event-afterprint')}} | {{Spec2('HTML WHATWG')}} |
{{Compat("api.Window.afterprint_event")}}