Baseline Widely available
Note: This feature is available in Web Workers.
The close()
method of the MessagePort
interface disconnects the port, so it is no longer active. This stops the flow of messages to that port.
None.
Return valueNone (undefined
).
In the following code block, you can see a handleMessage
handler function, run when a message is sent back to this document using EventTarget.addEventListener
.
channel.port1.addEventListener("message", handleMessage, false);
function handleMessage(e) {
para.innerHTML = e.data;
textInput.value = "";
}
channel.port1.start();
You could stop messages being sent at any time using
Specifications Browser compatibility See alsoRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3