From 6acf87987baea4675dbd1d5586663959e742cc03 Mon Sep 17 00:00:00 2001 From: MDN Date: Tue, 22 Feb 2022 00:12:14 +0000 Subject: [CRON] sync translated content --- .../document/afterscriptexecute_event/index.html | 51 ++++++++++++++++++++++ .../document/beforescriptexecute_event/index.html | 48 ++++++++++++++++++++ .../api/document/onafterscriptexecute/index.html | 50 --------------------- .../api/document/onbeforescriptexecute/index.html | 47 -------------------- 4 files changed, 99 insertions(+), 97 deletions(-) create mode 100644 files/ja/web/api/document/afterscriptexecute_event/index.html create mode 100644 files/ja/web/api/document/beforescriptexecute_event/index.html delete mode 100644 files/ja/web/api/document/onafterscriptexecute/index.html delete mode 100644 files/ja/web/api/document/onbeforescriptexecute/index.html (limited to 'files/ja/web/api/document') diff --git a/files/ja/web/api/document/afterscriptexecute_event/index.html b/files/ja/web/api/document/afterscriptexecute_event/index.html new file mode 100644 index 0000000000..f8b961ca92 --- /dev/null +++ b/files/ja/web/api/document/afterscriptexecute_event/index.html @@ -0,0 +1,51 @@ +--- +title: Document.onafterscriptexecute +slug: Web/API/Document/afterscriptexecute_event +tags: + - API + - DOM + - Non-standard + - Reference + - プロパティ + - 標準外 +translation_of: Web/API/Document/onafterscriptexecute +original_slug: Web/API/Document/onafterscriptexecute +--- +
{{ApiRef("DOM")}}{{non-standard_header}}
+ +

Document.onafterscriptexecute プロパティは、静的な {{HTMLElement("script")}} 要素のスクリプトの実行が終了したときに呼び出される関数を参照します。要素が {{domxref("Node.appendChild()", "appendChild()")}} などで動的に追加された場合には呼び出されません。

+ +

構文

+ +
document.onafterscriptexecute = funcRef;
+
+ +

funcRef は関数の参照で、イベントが発行されると呼び出されます。イベントの target 属性が、実行が完了した {{HTMLElement("script")}} 要素に設定されます。

+ +

+ +
function finished(e) {
+  logMessage(`Finished script with ID: ${e.target.id}`);
+}
+
+document.addEventListener('afterscriptexecute', finished, true);
+
+ +

ライブ例を表示

+ +

仕様書

+ + + +

ブラウザーの対応

+ +

{{Compat("api.Document.onafterscriptexecute")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/document/beforescriptexecute_event/index.html b/files/ja/web/api/document/beforescriptexecute_event/index.html new file mode 100644 index 0000000000..e9b3526529 --- /dev/null +++ b/files/ja/web/api/document/beforescriptexecute_event/index.html @@ -0,0 +1,48 @@ +--- +title: element.onbeforescriptexecute +slug: Web/API/Document/beforescriptexecute_event +tags: + - DOM +translation_of: Web/API/Document/onbeforescriptexecute +original_slug: 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);
+
+ +

実際の表示を確認

+ +

仕様書

+ + + +

関連情報

+ + diff --git a/files/ja/web/api/document/onafterscriptexecute/index.html b/files/ja/web/api/document/onafterscriptexecute/index.html deleted file mode 100644 index 33b98c0a0c..0000000000 --- a/files/ja/web/api/document/onafterscriptexecute/index.html +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Document.onafterscriptexecute -slug: Web/API/Document/onafterscriptexecute -tags: - - API - - DOM - - Non-standard - - Reference - - プロパティ - - 標準外 -translation_of: Web/API/Document/onafterscriptexecute ---- -
{{ApiRef("DOM")}}{{non-standard_header}}
- -

Document.onafterscriptexecute プロパティは、静的な {{HTMLElement("script")}} 要素のスクリプトの実行が終了したときに呼び出される関数を参照します。要素が {{domxref("Node.appendChild()", "appendChild()")}} などで動的に追加された場合には呼び出されません。

- -

構文

- -
document.onafterscriptexecute = funcRef;
-
- -

funcRef は関数の参照で、イベントが発行されると呼び出されます。イベントの target 属性が、実行が完了した {{HTMLElement("script")}} 要素に設定されます。

- -

- -
function finished(e) {
-  logMessage(`Finished script with ID: ${e.target.id}`);
-}
-
-document.addEventListener('afterscriptexecute', finished, true);
-
- -

ライブ例を表示

- -

仕様書

- - - -

ブラウザーの対応

- -

{{Compat("api.Document.onafterscriptexecute")}}

- -

関連情報

- - diff --git a/files/ja/web/api/document/onbeforescriptexecute/index.html b/files/ja/web/api/document/onbeforescriptexecute/index.html deleted file mode 100644 index 44d4c5febe..0000000000 --- a/files/ja/web/api/document/onbeforescriptexecute/index.html +++ /dev/null @@ -1,47 +0,0 @@ ---- -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