From 48f6b2871cd6d1899644ac819ab877f6688d8a6f Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Wed, 27 Jan 2021 13:33:37 -0500 Subject: [PATCH] Meta: add definition markup for MessageEvent --- source | 56 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/source b/source index 2e4439f25f9..02fee399df0 100644 --- a/source +++ b/source @@ -95478,7 +95478,7 @@ self.onmessage = function(ev) { events:

[Exposed=(Window,Worker,AudioWorklet)]
-interface MessageEvent : Event {
+interface MessageEvent : Event {
   constructor(DOMString type, optional MessageEventInit eventInitDict = {});
 
   readonly attribute any data;
@@ -95490,15 +95490,15 @@ interface MessageEvent : Event {
   undefined initMessageEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any data = null, optional USVString origin = "", optional DOMString lastEventId = "", optional MessageEventSource? source = null, optional sequence<MessagePort> ports = []);
 };
 
-dictionary MessageEventInit : EventInit {
-  any data = null;
-  USVString origin = "";
-  DOMString lastEventId = "";
-  MessageEventSource? source = null;
-  sequence<MessagePort> ports = [];
+dictionary MessageEventInit : EventInit {
+  any data = null;
+  USVString origin = "";
+  DOMString lastEventId = "";
+  MessageEventSource? source = null;
+  sequence<MessagePort> ports = [];
 };
 
-typedef (WindowProxy or MessagePort or ServiceWorker) MessageEventSource;
+typedef (WindowProxy or MessagePort or ServiceWorker) MessageEventSource;
@@ -95543,35 +95543,39 @@ typedef (WindowProxy or MessagePort or ServiceWo
-

The data attribute must return the value - it was initialized to. It represents the message being sent.

+

The data + attribute must return the value it was initialized to. It represents the message being sent.

-

The origin attribute must return the - value it was initialized to. It represents, in server-sent events and - cross-document messaging, the origin of - the document that sent the message (typically the scheme, hostname, and port of the document, but - not its path or fragment).

+

The origin attribute must return the value it was + initialized to. It represents, in server-sent events and cross-document + messaging, the origin of the document that + sent the message (typically the scheme, hostname, and port of the document, but not its path or + fragment).

-

The lastEventId attribute must - return the value it was initialized to. It represents, in server-sent events, the - last event ID string of the event - source.

+

The lastEventId attribute must return the value it + was initialized to. It represents, in server-sent events, the last event ID string of the event source.

-

The source attribute must return the - value it was initialized to. It represents, in cross-document messaging, the +

The source attribute must return the value it was + initialized to. It represents, in cross-document messaging, the WindowProxy of the browsing context of the Window object from which the message came; and in the connect events used by shared workers, the newly connecting MessagePort.

-

The ports attribute must return the - value it was initialized to. It represents, in cross-document messaging and - channel messaging, the MessagePort array being sent.

+

The ports + attribute must return the value it was initialized to. It represents, in cross-document + messaging and channel messaging, the MessagePort array being + sent.

-

The initMessageEvent() - method must initialize the event in a manner analogous to the similarly-named The initMessageEvent() method must initialize + the event in a manner analogous to the similarly-named initEvent() method.