Document: beforescriptexecute event - Web APIs | MDN
Syntax
Use the event name in methods like addEventListener(), or set an event handler property.
js
addEventListener("beforescriptexecute", (event) => { })
onbeforescriptexecute = (event) => { }
Event type
A generic Event.
Examples
js
function starting(e) {
logMessage(`Starting script with ID: ${e.target.id}`);
}
document.addEventListener("beforescriptexecute", starting);
// or
document.onbeforescriptexecute = starting;
Specifications
Not part of any specification.
Browser compatibility
See also
afterscriptexecuteevent ofDocumentDocument.currentScript