aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/document/beforescriptexecute_event
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2022-02-22 00:12:14 +0000
committerMDN <actions@users.noreply.github.com>2022-02-22 00:12:14 +0000
commit6acf87987baea4675dbd1d5586663959e742cc03 (patch)
tree83b489d9467dc18464207bbec4a8e5eaf9c804cd /files/ja/web/api/document/beforescriptexecute_event
parent92e543f7c53602f7b0ed8ba0788995632adf9601 (diff)
downloadtranslated-content-6acf87987baea4675dbd1d5586663959e742cc03.tar.gz
translated-content-6acf87987baea4675dbd1d5586663959e742cc03.tar.bz2
translated-content-6acf87987baea4675dbd1d5586663959e742cc03.zip
[CRON] sync translated content
Diffstat (limited to 'files/ja/web/api/document/beforescriptexecute_event')
-rw-r--r--files/ja/web/api/document/beforescriptexecute_event/index.html48
1 files changed, 48 insertions, 0 deletions
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
+---
+<div>{{ApiRef}}{{gecko_minversion_header("2")}}</div>
+
+<h2 id="Summary" name="Summary">概要</h2>
+
+<p>HTML 文書内で宣言された {{HTMLElement("script")}} 要素内のコードの実行開始直前に発生するイベントをハンドリングします。<code>appendChild()</code> などを用いるなどして動的に追加された script 要素ではこのイベントは発生しません。</p>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="syntaxbox"><em>document.onbeforescriptexecute = funcRef;</em>
+</pre>
+
+<ul>
+ <li><em>funcRef</em> : イベント発生時に呼ばれる関数への参照。イベントの <code>target</code> 属性は実行される script 要素に設定されます。</li>
+</ul>
+
+<h2 id="Example" name="Example">例</h2>
+
+<pre class="brush: js">// ※ logMessage 関数は定義済みとする
+
+function starting(e) {
+ logMessage("スクリプト実行開始(ID:" + e.target.id + ")");
+}
+
+document.addEventListener("beforescriptexecute", starting, 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="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li>{{domxref("element.onafterscriptexecute")}}</li>
+ <li>{{domxref("document.currentScript")}}</li>
+</ul>