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/onafterscriptexecute/index.html | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 files/ja/web/api/document/onafterscriptexecute/index.html (limited to 'files/ja/web/api/document/onafterscriptexecute') diff --git a/files/ja/web/api/document/onafterscriptexecute/index.html b/files/ja/web/api/document/onafterscriptexecute/index.html new file mode 100644 index 0000000000..7440dd0044 --- /dev/null +++ b/files/ja/web/api/document/onafterscriptexecute/index.html @@ -0,0 +1,52 @@ +--- +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")}}

+ +

関連情報

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