From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../ja/web/api/window/beforeprint_event/index.html | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 files/ja/web/api/window/beforeprint_event/index.html (limited to 'files/ja/web/api/window/beforeprint_event') diff --git a/files/ja/web/api/window/beforeprint_event/index.html b/files/ja/web/api/window/beforeprint_event/index.html new file mode 100644 index 0000000000..eb17e08e4f --- /dev/null +++ b/files/ja/web/api/window/beforeprint_event/index.html @@ -0,0 +1,75 @@ +--- +title: 'Window: beforeprint イベント' +slug: Web/API/Window/beforeprint_event +tags: + - Event + - Reference +translation_of: Web/API/Window/beforeprint_event +--- +
{{APIRef}}
+ +

beforeprint イベントは、関連する文書が印刷される直前や、印刷プレビューが開く直前に発生します。

+ + + + + + + + + + + + + + + + + + + + +
バブリングいいえ
キャンセル不可
インターフェイス{{domxref("Event")}}
イベントハンドラープロパティ{{domxref("WindowEventHandlers/onbeforeprint", "onbeforeprint")}}
+ +

+ +

addEventListener() の使用例:

+ +
window.addEventListener('beforeprint', (event) => {
+  console.log('Before print');
+});
+ +

onbeforeprint イベントハンドラープロパティの使用例:

+ +
window.onbeforeprint = (event) => {
+  console.log('Before print');
+};
+ +

仕様書

+ + + + + + + + + + + + + + +
仕様書状態
{{SpecName('HTML WHATWG', '#event-beforeprint')}}{{Spec2('HTML WHATWG')}}
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.Window.beforeprint_event")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf