channel.port1.addEventListener("message", handleMessage);
function handleMessage(e) {
para.innerHTML = e.data;
textInput.value = "";
}
channel.port1.start();MessagePort: close() method / notebook
MessagePort: close() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
channel.port1.close();