function finished(e) {
logMessage(`Finished script with ID: ${e.target.id}`);
}
document.addEventListener("afterscriptexecute", finished);
// Or (but note that this replaces other event listeners
// added using onafterscriptexecute, if any)
document.onafterscriptexecute = finished;Document: afterscriptexecute event / notebook
Document: afterscriptexecute event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.