From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../api/document/onbeforescriptexecute/index.html | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 files/ja/web/api/document/onbeforescriptexecute/index.html (limited to 'files/ja/web/api/document/onbeforescriptexecute/index.html') diff --git a/files/ja/web/api/document/onbeforescriptexecute/index.html b/files/ja/web/api/document/onbeforescriptexecute/index.html new file mode 100644 index 0000000000..13c1b5f606 --- /dev/null +++ b/files/ja/web/api/document/onbeforescriptexecute/index.html @@ -0,0 +1,47 @@ +--- +title: element.onbeforescriptexecute +slug: Web/API/Document/onbeforescriptexecute +tags: + - DOM +translation_of: Web/API/Document/onbeforescriptexecute +--- +
{{ApiRef}}{{gecko_minversion_header("2")}}
+ +

概要

+ +

HTML 文書内で宣言された {{HTMLElement("script")}} 要素内のコードの実行開始直前に発生するイベントをハンドリングします。appendChild() などを用いるなどして動的に追加された script 要素ではこのイベントは発生しません。

+ +

構文

+ +
document.onbeforescriptexecute = funcRef;
+
+ + + +

+ +
// ※ logMessage 関数は定義済みとする
+
+function starting(e) {
+  logMessage("スクリプト実行開始(ID:" + e.target.id + ")");
+}
+
+document.addEventListener("beforescriptexecute", starting, true);
+
+ +

実際の表示を確認

+ +

仕様書

+ + + +

関連情報

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