document.body.addEventListener(
"command",
(event) => {
const theAction = event.command;
if (theAction === "show-modal") {
console.log("Showing modal dialog");
}
},
{ capture: true },
);CommandEvent: command property / notebook
CommandEvent: command property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.