This specification is like no other — it has been processed with you, the humble web developer, in mind.
The focus of this specification is readability and ease of access. Unlike the full HTML Standard, this "developer's edition" removes information that only browser vendors need know. It is automatically produced from the full specification by our build tooling, and thus always in sync with the latest developments in HTML.
To read about its conception, construction, and future, read the original press release, and the blog post about its relaunch.
Finally, feel free to contribute on GitHub to make this edition better for everyone!
MessageEvent interfacesMessages in server-sent events, Web sockets, cross-document
messaging, channel messaging, and broadcast channels use the
MessageEvent interface for their message
events:
dataReturns the data of the message.
originReturns the origin of the message, for server-sent events and cross-document messaging.
lastEventIdReturns the last event ID string, for server-sent events.
sourceReturns the WindowProxy of the source window, for cross-document
messaging, and the MessagePort being attached, in the connect event fired at
SharedWorkerGlobalScope objects.
portsReturns the MessagePort array sent with the message, for cross-document
messaging and channel messaging.
Various APIs (e.g., WebSocket, EventSource) use the
MessageEvent interface for their message event
without using the MessagePort API.