A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/apis/web-messaging/MessagePort below:

MessagePort ยท WebPlatform Docs

MessagePort Summary

Exposes the available methods on the connected ports.

Properties

No properties.

Methods
close
Disconnects the port, so that it is no longer active.
postMessage
Posts a message through the channel, from one port to the other.
start
Begins dispatching messages received on the port. See Notes.
Events

No events.

Notes

Two MessagePort objects are automatically created when a MessageChannel object is created, and are returned by the port1 and port2 properties. Messages are sent from one port are received by the other, and vice versa. The MessagePort object provides the start method to begin dispatching messages received on the port, and the close method to close and disconnect the port. The postMessage method sends messages through the port. In Internet Explorer 10, message ports are automatically enabled when a message event is registered with the onmessage property or addEventListener method. This makes it unnecessary to explicitly call the start method under these conditions. After posting a MessagePort object using postMessage, the MessagePort object is implicitly closed.

Related specifications
W3C Web Messaging Specification
W3C Candidate Recommendation
Attributions

RetroSearch 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.4