diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/document/onafterscriptexecute/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/ja/web/api/document/onafterscriptexecute/index.html')
-rw-r--r-- | files/ja/web/api/document/onafterscriptexecute/index.html | 52 |
1 files changed, 52 insertions, 0 deletions
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 +--- +<div>{{ApiRef("DOM")}}{{non-standard_header}}</div> + +<p><strong><code>Document.onafterscriptexecute</code></strong> プロパティは、静的な {{HTMLElement("script")}} 要素のスクリプトの実行が終了したときに呼び出される関数を参照します。要素が {{domxref("Node.appendChild()", "appendChild()")}} などで動的に追加された場合には呼び出されません。</p> + +<h2 id="Syntax" name="Syntax">構文</h2> + +<pre class="syntaxbox"><var>document</var>.onafterscriptexecute = <var>funcRef</var>; +</pre> + +<p><var>funcRef</var> は関数の参照で、イベントが発行されると呼び出されます。イベントの <code>target</code> 属性が、実行が完了した {{HTMLElement("script")}} 要素に設定されます。</p> + +<h2 id="Example" name="Example">例</h2> + +<pre class="brush: js">function finished(e) { + logMessage(`Finished script with ID: ${e.target.id}`); +} + +document.addEventListener('afterscriptexecute', finished, true); +</pre> + +<p><a href="/samples/html/currentScript.html">ライブ例を表示</a></p> + +<h2 id="Specification" name="Specification">仕様書</h2> + +<ul> + <li><a href="http://www.whatwg.org/specs/web-apps/current-work/#the-script-element">HTML5</a></li> +</ul> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2> + +<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div> + +<p>{{Compat("api.Document.onafterscriptexecute")}}</p> + +<h2 id="See_also" name="See_also">関連情報</h2> + +<ul> + <li>{{domxref("Document.onbeforescriptexecute")}}</li> + <li>{{domxref("Document.currentScript")}}</li> +</ul> |