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;

View Live Example

Specifications

Not part of any specification.

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.