const wsURL = "wss://127.0.0.1/";
const wss = new WebSocketStream(wsURL);
wss.closed.then((result) => {
writeToScreen(
`DISCONNECTED: code ${result.closeCode}, message "${result.reason}"`,
);
console.log("Socket closed", result.closeCode, result.reason);
});WebSocketStream: closed property / notebook
WebSocketStream: closed property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.