self.addEventListener("push", (event) => {
let message = event.data.json();
switch (message.type) {
case "init":
doInit();
break;
case "shutdown":
doShutdown();
break;
}
});ServiceWorkerGlobalScope: push event / notebook
ServiceWorkerGlobalScope: push event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.