dataChannel.addEventListener("closing", (ev) => {
myConnectionStatus.icon = closingIcon;
myConnectionStatus.text = "Connection closing";
});RTCDataChannel: closing event / notebook
RTCDataChannel: closing event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
dataChannel.onclosing = (ev) => {
myConnectionStatus.icon = closingIcon;
myConnectionStatus.text = "Connection closing";
};