web api event
Document: afterscriptexecute event
The afterscriptexecute event fires when a static <script> element finishes executing its script. It does not fire if the element is added dynamically, such as with appendChild().
Syntax
Use the event name in methods like addEventListener(), or set an event handler property.
addEventListener("afterscriptexecute", (event) => { })
onafterscriptexecute = (event) => { }
Event type
A generic Event.
Examples
function finished(e) {
logMessage(`Finished script with ID: ${e.target.id}`);
}
document.addEventListener("afterscriptexecute", finished);
// or
document.onafterscriptexecute = finished;
Specifications
Not part of any specification.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
beforescriptexecuteevent ofDocumentcurrentScript