Document: beforescriptexecute イベント
非標準: この機能は標準ではなく、標準化の予定もありません。公開されているウェブサイトには使用しないでください。ユーザーによっては使用できないことがあります。実装ごとに大きな差があることもあり、将来は振る舞いが変わるかもしれません。
beforescriptexecute
イベントは、静的な <script>
が実行されようとするときに発行されます。このイベントは appendChild()
のように動的に要素が追加された場合には発行されません。
構文
このイベント名を addEventListener()
などのメソッドで使用するか、イベントハンドラーのプロパティを設定するかしてください。
js
addEventListener("beforescriptexecute", (event) => {});
onbeforescriptexecute = (event) => {};
イベント型
一般的な Event
です。
例
js
function starting(e) {
logMessage(`スクリプト実行開始 (ID: ${e.target.id})`);
}
document.addEventListener("beforescriptexecute", starting, true);
// または
document.onbeforescriptexecute = starting;
仕様書
どの仕様書にも含まれていません。
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
beforescriptexecute event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Non-standard. Check cross-browser support before using.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.