HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/6551

File a bug

SVNBugCommentTime (UTC)
6551[Gecko] [Internet Explorer] [Opera] [Webkit] Update Event interfaces to use constructors instead of init*Event methods; remove some typedefs.2011-09-10 01:24
Index: source
===================================================================
--- source	(revision 6550)
+++ source	(revision 6551)
@@ -2694,6 +2694,7 @@
 
      <li><dfn><code>Event</code></dfn> interface</li>
      <li><dfn><code>EventTarget</code></dfn> interface</li>
+     <li><dfn><code>EventInit</code></dfn> dictionary type</li>
      <li>The <dfn title="concept-event-type">type</dfn> of an event</li>
 
      <li><dfn title="dom-Event-target"><code>target</code></dfn> attribute</li>
@@ -2762,6 +2763,7 @@
 
      <li><dfn><code>UIEvent</code></dfn> interface</li>
      <li><dfn><code>MouseEvent</code></dfn> interface</li>
+     <li><dfn><code>MouseEventInit</code></dfn> dictionary type</li>
 
      <li><dfn title="event-click"><code>click</code></dfn> event</li>
 
@@ -28452,7 +28454,7 @@
   // tracks
   readonly attribute <span>AudioTrackList</span> <span title="dom-media-audioTracks">audioTracks</span>;
   readonly attribute <span>VideoTrackList</span> <span title="dom-media-videoTracks">videoTracks</span>;
-  readonly attribute <span>TextTrackList</span> <span title="dom-media-textTracks">textTracks</span>;
+  readonly attribute <span>TextTrack</span>[] <span title="dom-media-textTracks">textTracks</span>;
   <span>MutableTextTrack</span> <span title="dom-media-addTextTrack">addTextTrack</span>(DOMString kind, optional DOMString label, optional DOMString language);
 };</pre>
 
@@ -34096,10 +34098,8 @@
   readonly attribute <span>TextTrackCueList</span>? <span title="dom-TextTrack-activeCues">activeCues</span>;
 
            attribute <span>Function</span>? <span title="handler-TextTrack-oncuechange">oncuechange</span>;
-};
+};</pre>
 
-typedef <span>TextTrack</span>[] <dfn>TextTrackList</dfn>;</pre>
-
   <dl class="domintro">
 
    <dt><var title="">textTrack</var> . <code title="dom-TextTrack-kind">kind</code></dt>
@@ -60356,10 +60356,10 @@
    title="event-contextmenu">contextmenu</code>, that bubbles and is
    cancelable, and that uses the <code>MouseEvent</code> interface, at
    the element for which the menu was requested. The context
-   information of the event must be set to the same values as the last
-   <code>MouseEvent</code> user interaction event that was fired as
-   part of the gesture that that was interpreted as a request for the
-   context menu.</p></dd>
+   information of the event must be initialized to the same values as
+   the last <code>MouseEvent</code> user interaction event that was
+   fired as part of the gesture that that was interpreted as a request
+   for the context menu.</p></dd>
 
    <dt>Otherwise</dt>
 
@@ -73830,8 +73830,8 @@
      <code>Window</code> object), using the
      <code>PageTransitionEvent</code> interface, with the <code
      title="dom-PageTransitionEvent-persisted">persisted</code>
-     attribute set to true. This event must not bubble, must not be
-     cancelable, and has no default action.</p></li>
+     attribute initialized to true. This event must not bubble, must
+     not be cancelable, and has no default action.</p></li>
 
      <!-- an interesting thing to test would be to traverse back
      during onload, before the first pageshow has fired, and then to
@@ -73893,19 +73893,19 @@
    <li><p>Fire a <code title="event-popstate">popstate</code> event at
    the <code>Window</code> object of the <code>Document</code>, using
    the <code>PopStateEvent</code> interface, with the <code
-   title="dom-PopStateEvent-state">state</code> attribute set to the
-   value of <var title="">state</var>. This event must bubble but not
-   be cancelable and has no default action.</p></li>
+   title="dom-PopStateEvent-state">state</code> attribute initialized
+   to the value of <var title="">state</var>. This event must bubble
+   but not be cancelable and has no default action.</p></li>
 
    <li><p>If <var title="">hash changed</var> is true, then fire a
    <code title="event-hashchange">hashchange</code> event at the
    <span>browsing context</span>'s <code>Window</code> object, using
    the <code>HashChangeEvent</code> interface, with the <code
-   title="dom-HashChangeEvent-oldURL">oldURL</code> attribute set to
-   <var title="">old URL</var> and the <code
-   title="dom-HashChangeEvent-newURL">newURL</code> attribute set to
-   <var title="">new URL</var>. This event must bubble but not be
-   cancelable and has no default action.</p></li>
+   title="dom-HashChangeEvent-oldURL">oldURL</code> attribute
+   initialized to <var title="">old URL</var> and the <code
+   title="dom-HashChangeEvent-newURL">newURL</code> attribute
+   initialized to <var title="">new URL</var>. This event must bubble
+   but not be cancelable and has no default action.</p></li>
 
    <li><p>The <span>current entry</span> is now the <i>specified
    entry</i>.</p></li>
@@ -73924,9 +73924,13 @@
   is fired in certain cases when navigating to a <span>session history
   entry</span>.</p>
 
-  <pre class="idl">interface <dfn>PopStateEvent</dfn> : <span>Event</span> {
+  <pre class="idl">[Constructor(DOMString type, optional <span>PopStateEventInit</span> eventInitDict)]
+interface <dfn>PopStateEvent</dfn> : <span>Event</span> {
   readonly attribute any <span title="dom-PopStateEvent-state">state</span>;
-  void <span title="dom-PopStateEvent-initPopStateEvent">initPopStateEvent</span>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any stateArg);
+};
+
+dictionary <dfn>PopStateEventInit</dfn> : <span>EventInit</span> {
+  any state;
 };</pre>
 
   <dl class="domintro">
@@ -73945,15 +73949,11 @@
 
   <div class="impl">
 
-  <p>The <dfn
-  title="dom-PopStateEvent-initPopStateEvent"><code>initPopStateEvent()</code></dfn>
-  method must initialize the event in a manner analogous to the
-  similarly-named method in the DOM Events interfaces. <a
-  href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
-
   <p>The <dfn title="dom-PopStateEvent-state"><code>state</code></dfn>
-  attribute represents the context information for the event, or null,
-  if the state represented is the initial state of the
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to null. It
+  represents the context information for the event, or null, if the
+  state represented is the initial state of the
   <code>Document</code>.</p>
 
   </div>
@@ -73965,10 +73965,15 @@
   entry</span> whose <span>URL</span> differs from that of the
   previous one only in the fragment identifier.</p>
 
-  <pre class="idl">interface <dfn>HashChangeEvent</dfn> : <span>Event</span> {
+  <pre class="idl">[Constructor(DOMString type, optional <span>HashChangeEventInit</span> eventInitDict)]
+interface <dfn>HashChangeEvent</dfn> : <span>Event</span> {
   readonly attribute DOMString <span title="dom-HashChangeEvent-oldURL">oldURL</span>;
   readonly attribute DOMString <span title="dom-HashChangeEvent-newURL">newURL</span>;
-  void <span title="dom-HashChangeEvent-initHashChangeEvent">initHashChangeEvent</span>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, DOMString oldURLArg, DOMString newURLArg);
+};
+
+dictionary <dfn>HashChangeEventInit</dfn> : <span>EventInit</span> {
+  DOMString oldURL;
+  DOMString newURL;
 };</pre>
 
   <dl class="domintro">
@@ -73997,22 +74002,19 @@
   <div class="impl">
 
   <p>The <dfn
-  title="dom-HashChangeEvent-initHashChangeEvent"><code>initHashChangeEvent()</code></dfn>
-  method must initialize the event in a manner analogous to the
-  similarly-named method in the DOM Events interfaces. <a
-  href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
-
-  <p>The <dfn
   title="dom-HashChangeEvent-oldURL"><code>oldURL</code></dfn>
-  attribute represents context information for the event, specifically
-  the URL of the <span>session history entry</span> that was traversed
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to null. It
+  represents context information for the event, specifically the URL
+  of the <span>session history entry</span> that was traversed
   from.</p>
 
   <p>The <dfn
   title="dom-HashChangeEvent-newURL"><code>newURL</code></dfn>
-  attribute represents context information for the event, specifically
-  the URL of the <span>session history entry</span> that was traversed
-  to.</p>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to null. It
+  represents context information for the event, specifically the URL
+  of the <span>session history entry</span> that was traversed to.</p>
 
   </div>
 
@@ -74026,9 +74028,13 @@
   event is fired when traversing <em>from</em> a <span>session history
   entry</span>.</p>
 
-  <pre class="idl">interface <dfn>PageTransitionEvent</dfn> : <span>Event</span> {
+  <pre class="idl">[Constructor(DOMString type, optional <span>PageTransitionEventInit</span> eventInitDict)]
+interface <dfn>PageTransitionEvent</dfn> : <span>Event</span> {
   readonly attribute boolean <span title="dom-PageTransitionEvent-persisted">persisted</span>;
-  void <span title="dom-PageTransitionEvent-initPageTransitionEvent">initPageTransitionEvent</span>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, boolean persistedArg);
+};
+
+dictionary <dfn>PageTransitionEventInit</dfn> : <span>EventInit</span> {
+  boolean persisted;
 };</pre>
 
   <dl class="domintro">
@@ -74046,14 +74052,10 @@
   <div class="impl">
 
   <p>The <dfn
-  title="dom-PageTransitionEvent-initPageTransitionEvent"><code>initPageTransitionEvent()</code></dfn>
-  method must initialize the event in a manner analogous to the
-  similarly-named method in the DOM Events interfaces. <a
-  href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
-
-  <p>The <dfn
   title="dom-PageTransitionEvent-persisted"><code>persisted</code></dfn>
-  attribute represents the context information for the event.</p>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to false. It
+  represents the context information for the event.</p>
 
   </div>
 
@@ -74165,8 +74167,8 @@
    <code>Window</code> object), using the
    <code>PageTransitionEvent</code> interface, with the <code
    title="dom-PageTransitionEvent-persisted">persisted</code>
-   attribute set to true. This event must not bubble, must not be
-   cancelable, and has no default action.</p></li>
+   attribute initialized to true. This event must not bubble, must not
+   be cancelable, and has no default action.</p></li>
 
    <li><p><i>Unload event</i>: <span>Fire a simple event</span> named
    <code title="event-unload">unload</code> at the
@@ -77695,13 +77697,6 @@
     when an element is <span title="insert an element into a
     document">inserted into the document</span>.</p>
 
-    <!--
-    <p>Asynchronous mutation events must be fired using <span
-    title="concept-task">tasks</span> <span title="queue a
-    task">queued</span> with the <span>DOM manipulation task
-    source</span>. <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
-    -->
-
    </dd>
 
    <dt>The <dfn>user interaction task source</dfn></dt>
@@ -78441,15 +78436,16 @@
   event object must have its <code title="">screenX</code>, <code
   title="">screenY</code>, <code title="">clientX</code>, <code
   title="">clientY</code>, and <code title="">button</code> attributes
-  set to 0, its <code title="">ctrlKey</code>, <code
+  initialized to 0, its <code title="">ctrlKey</code>, <code
   title="">shiftKey</code>, <code title="">altKey</code>, and <code
-  title="">metaKey</code> attributes set according to the current
-  state of the key input device, if any (false for any keys that are
-  not available), its <code title="">detail</code> attribute set to 1,
-  and its <code title="">relatedTarget</code> attribute set to null.
-  The <code title="">getModifierState()</code> method on the object
-  must return values appropriately describing the state of the key
-  input device at the time the event is created.</p>
+  title="">metaKey</code> attributes initialized according to the
+  current state of the key input device, if any (false for any keys
+  that are not available), its <code title="">detail</code> attribute
+  initialized to 1, and its <code title="">relatedTarget</code>
+  attribute initialized to null. The <code
+  title="">getModifierState()</code> method on the object must return
+  values appropriately describing the state of the key input device at
+  the time the event is created.</p>
 
   <p><dfn title="fire a click event">Firing a <code
   title="event-click">click</code> event</dfn> means <span title="fire
@@ -83330,10 +83326,13 @@
   <p>The drag-and-drop processing model involves several events. They
   all use the <code>DragEvent</code> interface.</p>
 
-  <pre class="idl">interface <dfn>DragEvent</dfn> : <span>MouseEvent</span> {
+  <pre class="idl">[Constructor(DOMString type, optional <span>DragEventInit</span> eventInitDict)]
+interface <dfn>DragEvent</dfn> : <span>MouseEvent</span> {
   readonly attribute <span>DataTransfer</span>? <span title="dom-DragEvent-dataTransfer">dataTransfer</span>;
+};
 
-  void <span title="dom-DragEvent-initDragEvent">initDragEvent</span>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dummyArg<!-- used to be viewArg, back when we had views -->, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, boolean ctrlKeyArg, boolean altKeyArg, boolean shiftKeyArg, boolean metaKeyArg, unsigned short buttonArg, EventTarget relatedTargetArg, <span>DataTransfer</span>? dataTransferArg);
+dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
+  <span>DataTransfer</span>? dataTransfer;
 };</pre>
 
   <dl class="domintro">
@@ -83351,16 +83350,11 @@
   <div class="impl">
 
   <p>The <dfn
-  title="dom-DragEvent-initDragEvent"><code>initDragEvent()</code></dfn>
-  method must initialize the event in a manner analogous to the
-  similarly-named method in the DOM Events interfaces, except that the
-  <var title="">dummyArg</var> argument must be ignored. <a
-  href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
-
-  <p>The <dfn
   title="dom-DragEvent-dataTransfer"><code>dataTransfer</code></dfn>
-  attribute of the <code>DragEvent</code> interface represents the
-  context information for the event.</p>
+  attribute of the <code>DragEvent</code> interface must return the
+  value it was initialized to. When the object is created, this
+  attribute must be initialized to null. It represents the context
+  information for the event.</p>
 
   </div>
 
@@ -83463,12 +83457,13 @@
     cancelable unless <var title="">e</var> is <code
     title="event-dragleave">dragleave</code> or <code
     title="event-dragend">dragend</code>, and to have the <code
-    title="dom-UIEvent-detail">detail</code> attribute set to zero,
-    the mouse and key attributes set according to the state of the
-    input devices as they would be for user interaction events, the
-    <code title="">relatedTarget</code> attribute set to null, and the
-    <code title="dom-DragEvent-dataTransfer">dataTransfer</code>
-    attribute set to <var title="">dataTransfer</var>, the
+    title="dom-UIEvent-detail">detail</code> attribute initialized to
+    zero, the mouse and key attributes initialized according to the
+    state of the input devices as they would be for user interaction
+    events, the <code title="">relatedTarget</code> attribute
+    initialized to null, and the <code
+    title="dom-DragEvent-dataTransfer">dataTransfer</code> attribute
+    initialized to <var title="">dataTransfer</var>, the
     <code>DataTransfer</code> object created above.</p>
 
     <!-- interaction event spec point -->
@@ -85629,7 +85624,7 @@
   <pre class="idl">[<span title="dom-MediaStream">Constructor</span>(<span>MediaStream</span> parentStream)]
 interface <dfn>MediaStream</dfn> : <span>EventTarget</span> {
   readonly attribute DOMString <span title="dom-MediaStream-label">label</span>;
-  readonly attribute <span>MediaStreamTrackList</span> <span title="dom-MediaStream-tracks">tracks</span>;
+  readonly attribute <span>MediaStreamTrack</span>[] <span title="dom-MediaStream-tracks">tracks</span>;
 
   <span>MediaStreamRecorder</span> <span title="dom-MediaStream-record">record</span>();
 <!--
@@ -85644,8 +85639,6 @@
   void <span title="dom-MediaStream-stop">stop</span>();
 };
 
-typedef <span>MediaStreamTrack</span>[] <dfn>MediaStreamTrackList</dfn>;
-
 interface <dfn>MediaStreamTrack</dfn> {
   readonly attribute DOMString <span title="dom-MediaStreamTrack-kind">kind</span>;
   readonly attribute DOMString <span title="dom-MediaStreamTrack-label">label</span>;
@@ -85698,21 +85691,12 @@
 
    <dd>
 
-    <p>Returns a <code>MediaStreamTrackList</code> object representing
+    <p>Returns a <code>MediaStreamTrack</code> array representing
     the tracks that can be enabled and disabled.</p>
 
    </dd>
 
 
-   <dt><var title="">stream</var> . <code title="dom-MediaStream-tracks">tracks</code> . <code title="dom-MediaStreamTrackList-length">length</code></dt>
-
-   <dd>
-
-    <p>Returns the number of tracks in the list.</p>
-
-   </dd>
-
-
    <dt><var title="">track</var> = <var title="">stream</var> . <code title="dom-MediaStream-tracks">tracks</code>[<var title="">index</var>]</dt>
 
    <dd>
@@ -87440,7 +87424,7 @@
    interface, with the name <code
    title="event-message">message</code>, which does not bubble, is not
    cancelable, has no default action, and has a <code
-   title="dom-MessageEvent-data">data</code> attribute whose value is
+   title="dom-MessageEvent-data">data</code> attribute initialized to
    <var title="">message</var>, and <span>queue a task</span> to
    dispatch the event at the <code>PeerConnection</code> object
    responsible for this side of the <span>data UDP media
@@ -87535,32 +87519,33 @@
   <code title="event-MediaStream-removestream">removestream</code> events
   use the <code>MediaStreamEvent</code> interface:</p>
 
-  <pre class="idl">interface <dfn>MediaStreamEvent</dfn> : <span>Event</span> {
+  <pre class="idl">[Constructor(DOMString type, optional <span>MediaStreamEventInit</span> eventInitDict)]
+interface <dfn>MediaStreamEvent</dfn> : <span>Event</span> {
   readonly attribute <span>MediaStream</span>? <span title="dom-MediaStreamEvent-stream">stream</span>;
-  void <span title="dom-MediaStreamEvent-initMediaStreamEvent">initMediaStreamEvent</span>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, <span>MediaStream</span>? streamArg);
+};
+
+dictionary <dfn>MediaStreamEventInit</dfn> : <span>EventInit</span> {
+  DOMString <span>MediaStream</span>? stream;
 };</pre>
 
   <div class="impl">
 
   <p>The <dfn
-  title="dom-MediaStreamEvent-initMediaStreamEvent"><code>initMediaStreamEvent()</code></dfn>
-  method must initialize the event in a manner analogous to the
-  similarly-named method in the DOM Events interfaces. <a
-  href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+  title="dom-MediaStreamEvent-stream"><code>stream</code></dfn>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to null. It
+  represents the <code>MediaStream</code> object associated with the
+  event.</p>
 
-  <p>The <dfn title="dom-MediaStreamEvent-stream"><code>stream</code></dfn>
-  attribute represents the <code>MediaStream</code> object associated with
-  the event.</p>
-
   <p><dfn title="fire a stream event">Firing a stream event named <var
   title="">e</var></dfn> with a <code>MediaStream</code> <var
   title="">stream</var> means that an event with the name <var
   title="">e</var>, which does not bubble (except where otherwise
   stated) and is not cancelable (except where otherwise stated), and
-  which uses the <code>MediaStreamEvent</code> interface with the <code
-  title="dom-MediaStreamEvent-stream">stream</code> attribute set to <var
-  title="">stream</var>, must be created and dispatched at the given
-  target.</p>
+  which uses the <code>MediaStreamEvent</code> interface with the
+  <code title="dom-MediaStreamEvent-stream">stream</code> attribute
+  initialized to <var title="">stream</var>, must be created and
+  dispatched at the given target.</p>
 
   </div>
 
@@ -88803,11 +88788,11 @@
   cancelable, with its <code
   title="dom-ErrorEvent-message">message</code>, <code
   title="dom-ErrorEvent-filename">filename</code>, and <code
-  title="dom-ErrorEvent-lineno">lineno</code> attributes set
+  title="dom-ErrorEvent-lineno">lineno</code> attributes initialized
   appropriately, at the <code>Worker</code> object associated with the
-  worker. If the event is not canceled, the user agent must act as if the
-  uncaught runtime script error had occurred in the global scope that
-  the <code>Worker</code> object is in, thus repeating the entire
+  worker. If the event is not canceled, the user agent must act as if
+  the uncaught runtime script error had occurred in the global scope
+  that the <code>Worker</code> object is in, thus repeating the entire
   runtime script error reporting process one level up.</p>
 
   <p>If the implicit port connecting the worker to its
@@ -88829,29 +88814,36 @@
 
   <hr>
 
-  <pre class="idl">interface <dfn>ErrorEvent</dfn> : <span>Event</span> {
+  <pre class="idl">[Constructor(DOMString type, optional <span>ErrorEventInit</span> eventInitDict)]
+interface <dfn>ErrorEvent</dfn> : <span>Event</span> {
   readonly attribute DOMString <span title="dom-ErrorEvent-message">message</span>;
   readonly attribute DOMString <span title="dom-ErrorEvent-filename">filename</span>;
   readonly attribute unsigned long <span title="dom-ErrorEvent-lineno">lineno</span>;
-  void <span title="dom-ErrorEvent-initErrorEvent">initErrorEvent</span>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, DOMString messageArg, DOMString filenameArg, unsigned long linenoArg);
+};
+
+dictionary <dfn>ErrorEventInit</dfn> : <span>EventInit</span> {
+  DOMString message;
+  DOMString filename;
+  unsigned long lineno;
 };</pre>
 
   <p>The <dfn
-  title="dom-ErrorEvent-initErrorEvent"><code>initErrorEvent()</code></dfn>
-  method must initialize the event in a manner analogous to the
-  similarly-named method in the DOM Events interfaces. <a
-  href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+  title="dom-ErrorEvent-message"><code>message</code></dfn> attribute
+  must return the value it was initialized to. When the object is
+  created, this attribute must be initialized to the empty string. It
+  represents the error message.</p>
 
-  <p>The <dfn title="dom-ErrorEvent-message"><code>message</code></dfn>
-  attribute represents the error message.</p>
-
   <p>The <dfn
   title="dom-ErrorEvent-filename"><code>filename</code></dfn>
-  attribute represents the <span>absolute URL</span> of the script in
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to the empty
+  string. It represents the <span>absolute URL</span> of the script in
   which the error originally occurred.</p>
 
   <p>The <dfn title="dom-ErrorEvent-lineno"><code>lineno</code></dfn>
-  attribute represents the line number where the error occurred in the
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to zero. It
+  represents the line number where the error occurred in the
   script.</p>
 
 
@@ -89191,12 +89183,13 @@
        title="event-connect">connect</code>, which does not bubble, is
        not cancelable, has no default action, has a <code
        title="dom-MessageEvent-data">data</code> attribute whose value
-       is the empty string and has a <code
+       is initialized to the empty string and has a <code
        title="dom-MessageEvent-ports">ports</code> attribute whose
-       value is a <span title="dfn-read-only-array">read only</span>
-       array containing only the newly created port, and <span>queue a
-       task</span> to dispatch the event at <var title="">worker
-       global scope</var>.</p></li>
+       value is initialized to a <span
+       title="dfn-read-only-array">read only</span> array containing
+       only the newly created port, and <span>queue a task</span> to
+       dispatch the event at <var title="">worker global
+       scope</var>.</p></li>
 
        <li>
 
@@ -89258,12 +89251,12 @@
    title="event-connect">connect</code>, which does not bubble, is not
    cancelable, has no default action, has a <code
    title="dom-MessageEvent-data">data</code> attribute whose value is
-   the empty string and has a <code
+   initialized to the empty string and has a <code
    title="dom-MessageEvent-ports">ports</code> attribute whose value
-   is a <span title="dfn-read-only-array">read only</span> array
-   containing only the newly created port, and <span>queue a
-   task</span> to dispatch the event at <var title="">worker global
-   scope</var>.</p></li>
+   is initialized to a <span title="dfn-read-only-array">read
+   only</span> array containing only the newly created port, and
+   <span>queue a task</span> to dispatch the event at <var
+   title="">worker global scope</var>.</p></li>
 
    <li>
 
@@ -89591,13 +89584,21 @@
 
   <p>The following interface is defined for this event:</p>
 
-  <pre class="idl">interface <dfn>MessageEvent</dfn> : <span>Event</span> {
+  <pre class="idl">[Constructor(DOMString type, optional <span>MessageEventInit</span> eventInitDict)]
+interface <dfn>MessageEvent</dfn> : <span>Event</span> {
   readonly attribute any <span title="dom-MessageEvent-data">data</span>;
   readonly attribute DOMString <span title="dom-MessageEvent-origin">origin</span>;
   readonly attribute DOMString <span title="dom-MessageEvent-lastEventId">lastEventId</span>;
   readonly attribute <span>WindowProxy</span>? <span title="dom-MessageEvent-source">source</span>;
-  readonly attribute <span>MessagePort</span>[] <span title="dom-MessageEvent-ports">ports</span>;
-  void <span title="dom-MessageEvent-initMessageEvent">initMessageEvent</span>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, <span>WindowProxy</span>? sourceArg, sequence&lt;<span>MessagePort</span>&gt; portsArg);
+  readonly attribute <span>MessagePort</span>[]? <span title="dom-MessageEvent-ports">ports</span>;
+};
+
+dictionary <dfn>MessageEventInit</dfn> : <span>EventInit</span> {
+  any data;
+  DOMString origin;
+  DOMString lastEventId;
+  <span>WindowProxy</span>? source;
+  <span>MessagePort</span>[]? ports;
 };</pre>
 
   <dl class="domintro">
@@ -89652,18 +89653,15 @@
 
   <div class="impl">
 
-  <p>The <dfn
-  title="dom-MessageEvent-initMessageEvent"><code>initMessageEvent()</code></dfn>
-  method must initialize the event in a manner analogous to the
-  similarly-named method in the DOM Events interfaces. <a
-  href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+  <p>The <dfn title="dom-MessageEvent-data"><code>data</code></dfn>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to null. It
+  represents the message being sent.</p>
 
   <p>The <dfn
-  title="dom-MessageEvent-data"><code>data</code></dfn>
-  attribute represents the message being sent.</p>
-
-  <p>The <dfn
   title="dom-MessageEvent-origin"><code>origin</code></dfn> attribute
+  must return the value it was initialized to. When the object is
+  created, this attribute must be initialized to the empty string. It
   represents, in <span>server-sent events</span> and
   <span>cross-document messaging</span>, the <span>origin</span> of
   the document that sent the message (typically the scheme, hostname,
@@ -89672,33 +89670,28 @@
 
   <p>The <dfn
   title="dom-MessageEvent-lastEventId"><code>lastEventId</code></dfn>
-  attribute represents, in <span>server-sent events</span>, the <span
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to the empty
+  string. It represents, in <span>server-sent events</span>, the <span
   title="concept-event-stream-last-event-id">last event ID
   string</span> of the event source.</p>
 
   <p>The <dfn
   title="dom-MessageEvent-source"><code>source</code></dfn> attribute
-  represents, in <span>cross-document messaging</span>, the
+  must return the value it was initialized to. When the object is
+  created, this attribute must be initialized to null. It represents,
+  in <span>cross-document messaging</span>, the
   <code>WindowProxy</code> of the <span>browsing context</span> of the
   <code>Window</code> object from which the message came.</p>
 
-  <p>The <dfn
-  title="dom-MessageEvent-ports"><code>ports</code></dfn>
-  attribute represents, in <span>cross-document messaging</span> and
+  <p>The <dfn title="dom-MessageEvent-ports"><code>ports</code></dfn>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to null<!-- a
+  <span title="dfn-read-only-array">read only</span> empty array-->.
+  It represents, in <span>cross-document messaging</span> and
   <span>channel messaging</span> the <code>MessagePort</code> array
   being sent, if any.</p>
 
-  <p>Except where otherwise specified, when the user agent creates and
-  dispatches a <code title="event-message">message</code> event in the
-  algorithms described in the following sections, the <code
-  title="dom-MessageEvent-lastEventId">lastEventId</code> attribute
-  must be the empty string, the <code
-  title="dom-MessageEvent-origin">origin</code> attribute must be the
-  empty string, the <code
-  title="dom-MessageEvent-source">source</code> attribute must be
-  null, and the <code title="dom-MessageEvent-ports">ports</code>
-  attribute must be null.</p>
-
   </div>
 
   <!--END postmsg-->
@@ -90251,27 +90244,18 @@
    U+000A LINE FEED (LF) character, then remove the last character
    from the <var title="">data</var> buffer.</p></li>
 
-<!--(there's no longer such a think as an invalid event type name it would seem)
-   <li><p>If the <var title="">event name</var> buffer is not the
-   empty string but is also not a valid event type name, as defined by
-   the DOM Events specification, set the <var title="">data</var>
-   buffer and the <var title="">event name</var> buffer to the empty
-   string and abort these steps. <a
-   href="#refsDOMEVENTS">[DOMEVENTS]</a></p></li>
--->
-
    <li><p>Create an event that uses the <code>MessageEvent</code>
    interface, with the event name <code
    title="event-message">message</code>, which does not bubble, is not
    cancelable, and has no default action. The <code
-   title="dom-MessageEvent-data">data</code> attribute must be set to
-   the value of the <var title="">data</var> buffer, the <code
-   title="dom-MessageEvent-origin">origin</code> attribute must be set
-   to the <span title="Unicode serialization of an origin">Unicode
-   serialization</span> of the <span>origin</span> of the event
-   stream's URL, and the <code
+   title="dom-MessageEvent-data">data</code> attribute must be
+   initialized to the value of the <var title="">data</var> buffer,
+   the <code title="dom-MessageEvent-origin">origin</code> attribute
+   must be initialized to the <span title="Unicode serialization of an
+   origin">Unicode serialization</span> of the <span>origin</span> of
+   the event stream's URL, and the <code
    title="dom-MessageEvent-lastEventId">lastEventId</code> attribute
-   must be set to the <span
+   must be initialized to the <span
    title="concept-event-stream-last-event-id">last event ID
    string</span> of the event source.</p></li>
 
@@ -91239,7 +91223,7 @@
 
    </li>
 
-   <li><p>Set <var title="">event</var>'s <code
+   <li><p>Initialize <var title="">event</var>'s <code
    title="dom-MessageEvent-origin">origin</code> attribute to the
    <span title="Unicode serialization of an origin">Unicode
    serialization</span> of the <span>origin</span> of the
@@ -91249,13 +91233,13 @@
    <li>
 
     <p>If <var title="">type</var> indicates that the data is Text,
-    then set <var title="">event</var>'s <code
+    then initialize <var title="">event</var>'s <code
     title="dom-MessageEvent-data">data</code> attribute to <var
     title="">data</var>.
 
     <p>If <var title="">type</var> indicates that the data is Binary,
     and <code title="dom-WebSocket-binaryType">binaryType</code> is
-    set to "<code title="">blob</code>", then set <var
+    set to "<code title="">blob</code>", then initialize <var
     title="">event</var>'s <code
     title="dom-MessageEvent-data">data</code> attribute to a new
     <code>Blob</code> object that represents <var title="">data</var>
@@ -91263,7 +91247,7 @@
 
     <p>If <var title="">type</var> indicates that the data is Binary,
     and <code title="dom-WebSocket-binaryType">binaryType</code> is
-    set to "<code title="">arraybuffer</code>", then set <var
+    set to "<code title="">arraybuffer</code>", then initialize <var
     title="">event</var>'s <code
     title="dom-MessageEvent-data">data</code> attribute to a new
     read-only <code>ArrayBuffer</code> object whose contents are <var
@@ -91332,12 +91316,12 @@
    interface, with the event name <code
    title="event-close">close</code>, which does not bubble, is not
    cancelable, has no default action, whose <code
-   title="dom-CloseEvent-wasClean">wasClean</code> attribute is set to
+   title="dom-CloseEvent-wasClean">wasClean</code> attribute is initialized to
    true if the connection closed <i title="">cleanly</i> and false
    otherwise, whose <code title="dom-CloseEvent-code">code</code>
-   attribute is set to <i>the WebSocket connection close code</i>, and
+   attribute is initialized to <i>the WebSocket connection close code</i>, and
    whose <code title="dom-CloseEvent-reason">reason</code> attribute
-   is set to <i>the WebSocket connection close reason</i>
+   is initialized to <i>the WebSocket connection close reason</i>
    <span>decoded as UTF-8, with error handling</span>, and dispatch
    the event at the <code>WebSocket</code> object. <a
    href="#refsWSP">[WSP]</a></p></li>
@@ -91352,31 +91336,35 @@
 
   <h5>Event definitions</h5>
 
-  <pre class="idl">interface <dfn>CloseEvent</dfn> : <span>Event</span> {
+  <pre class="idl">[Constructor(DOMString type, optional <span>CloseEventInit</span> eventInitDict)]
+interface <dfn>CloseEvent</dfn> : <span>Event</span> {
   readonly attribute boolean <span title="dom-CloseEvent-wasClean">wasClean</span>;
   readonly attribute unsigned short <span title="dom-CloseEvent-code">code</span>;
   readonly attribute DOMString <span title="dom-WebSocket-reason">reason</span>;
-  void <span title="dom-CloseEvent-initCloseEvent">initCloseEvent</span>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, boolean wasCleanArg, unsigned short codeArg, DOMString reasonArg);
+};
+
+dictionary <dfn>CloseEventInit</dfn> : <span>EventInit</span> {
+  boolean wasClean;
+  unsigned short code;
+  DOMString reason;
 };</pre>
 
   <p>The <dfn
-  title="dom-CloseEvent-initCloseEvent"><code>initCloseEvent()</code></dfn>
-  method must initialize the event in a manner analogous to the
-  similarly-named method in the DOM Events interfaces. <a
-  href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
-
-  <p>The <dfn
   title="dom-CloseEvent-wasClean"><code>wasClean</code></dfn>
-  attribute represents whether the connection closed cleanly or
-  not.</p>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to false. It
+  represents whether the connection closed cleanly or not.</p>
 
   <p>The <dfn title="dom-CloseEvent-code"><code>code</code></dfn>
-  attribute represents the WebSocket connection close code provided by
-  the server.</p>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to zero. It
+  represents the WebSocket connection close code provided by the
+  server.</p>
 
-  <p>The <dfn
-  title="dom-CloseEvent-reason"><code>reason</code></dfn>
-  attribute represents the WebSocket connection close reason provided
+  <p>The <dfn title="dom-CloseEvent-reason"><code>reason</code></dfn>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to empty
+  string. It represents the WebSocket connection close reason provided
   by the server.</p>
 
 
@@ -91752,19 +91740,19 @@
     interface, with the event name <code
     title="event-message">message</code>, which does not bubble, is
     not cancelable, and has no default action. The <code
-    title="dom-MessageEvent-data">data</code> attribute must be set to
-    the value of <var title="">message clone</var>, the <code
-    title="dom-MessageEvent-origin">origin</code> attribute must be
-    set to the <span title="Unicode serialization of an
+    title="dom-MessageEvent-data">data</code> attribute must be
+    initialized to the value of <var title="">message clone</var>, the
+    <code title="dom-MessageEvent-origin">origin</code> attribute must
+    be initialized to the <span title="Unicode serialization of an
     origin">Unicode serialization</span> of the <span>origin</span> of
     the script that invoked the method, the <code
     title="dom-MessageEvent-source">source</code> attribute must be
-    set to the <span>script's global object</span>'s
+    initialized to the <span>script's global object</span>'s
     <code>WindowProxy</code> object, and the <code
-    title="dom-MessageEvent-ports">ports</code> attribute must be set
-    to the <var title="">new ports</var> array.</p> <!-- invariant:
-    the global object is always a Window if the script can see this
-    method -->
+    title="dom-MessageEvent-ports">ports</code> attribute must be
+    initialized to the <var title="">new ports</var> array.</p> <!--
+    invariant: the global object is always a Window if the script can
+    see this method -->
 
    </li>
 
@@ -92168,19 +92156,6 @@
 
    </li>
 
-   <li><p>Create an event that uses the <code>MessageEvent</code>
-   interface, with the name <code
-   title="event-message">message</code>, which does not bubble, is not
-   cancelable, and has no default action.</p></li>
-
-   <li><p>Let the <code title="dom-MessageEvent-data">data</code>
-   attribute of the event have the value of <var title="">message
-   clone</var>.</p></li>
-
-   <li><p>Let the <code title="dom-MessageEvent-ports">ports</code>
-   attribute of the event be the <var title="">new ports</var>
-   array.</p></li>
-
    <li><p>If there is no <var title="">target port</var> (i.e. if <var
    title="">source port</var> is not entangled), then abort these
    steps.</p></li> <!-- we don't raise an exception if there is no
@@ -92191,6 +92166,19 @@
    whether the ports have become useless, or in when the structured
    clone algorithm runs scripts -->
 
+   <li><p>Create an event that uses the <code>MessageEvent</code>
+   interface, with the name <code
+   title="event-message">message</code>, which does not bubble, is not
+   cancelable, and has no default action.</p></li>
+
+   <li><p>Let the <code title="dom-MessageEvent-data">data</code>
+   attribute of the event be initialized to the value of <var
+   title="">message clone</var>.</p></li>
+
+   <li><p>Let the <code title="dom-MessageEvent-ports">ports</code>
+   attribute of the event be initialized to the <var title="">new
+   ports</var> array.</p></li>
+
    <li><p>Add the event to the <span>port message queue</span> of <var
    title="">target port</var>.</p></li>
 
@@ -92241,13 +92229,13 @@
    cancelable, and has no default action.</p></li>
 
    <li><p>Let the <code title="dom-MessageEvent-data">data</code>
-   attribute of the event have the value of <var
+   attribute of the event be initialized to the value of <var
    title="">message</var>, the method's first argument.</p></li>
 
    <li><p>Let the <code title="dom-MessageEvent-ports">ports</code>
-   attribute of the event be a <span title="dfn-read-only-array">read
-   only</span> array containing only <var
-   title="">port2</var>.</p></li>
+   attribute of the event be initialized to a <span
+   title="dfn-read-only-array">read only</span> array containing only
+   <var title="">port2</var>.</p></li>
 
    <li><p>Return <var title="">port1</var> from the method, but
    continue with these steps.</p></li>
@@ -92787,11 +92775,11 @@
   title="dom-Storage-setItem">setItem()</code> or <code
   title="dom-Storage-removeItem">removeItem()</code> methods, the
   event must have its <code title="dom-StorageEvent-key">key</code>
-  attribute set to the name of the key in question, its <code
-  title="dom-StorageEvent-oldValue">oldValue</code> attribute set to
+  attribute initialized to the name of the key in question, its <code
+  title="dom-StorageEvent-oldValue">oldValue</code> attribute initialized to
   the old value of the key in question, or null if the key is newly
   added, and its <code
-  title="dom-StorageEvent-newValue">newValue</code> attribute set to
+  title="dom-StorageEvent-newValue">newValue</code> attribute initialized to
   the new value of the key in question, or null if the key was
   removed.</p>
 
@@ -92799,56 +92787,67 @@
   the <code title="dom-Storage-clear">clear()</code> method, the event
   must have its <code title="dom-StorageEvent-key">key</code>, <code
   title="dom-StorageEvent-oldValue">oldValue</code>, and <code
-  title="dom-StorageEvent-newValue">newValue</code> attributes set to
-  null.</p>
+  title="dom-StorageEvent-newValue">newValue</code> attributes
+  initialized to null.</p>
 
   <p>In addition, the event must have its <code
-  title="dom-StorageEvent-url">url</code> attribute set to <span
-  title="the document's address">the address of the document</span>
-  whose <code>Storage</code> object was affected; and its <code
-  title="dom-StorageEvent-storageArea">storageArea</code> attribute
-  set to the <code>Storage</code> object from the <code>Window</code>
-  object of the target <code>Document</code> that represents the same
-  kind of <code>Storage</code> area as was affected (i.e. session or
-  local).</p>
+  title="dom-StorageEvent-url">url</code> attribute initialized to
+  <span title="the document's address">the address of the
+  document</span> whose <code>Storage</code> object was affected; and
+  its <code title="dom-StorageEvent-storageArea">storageArea</code>
+  attribute initialized to the <code>Storage</code> object from the
+  <code>Window</code> object of the target <code>Document</code> that
+  represents the same kind of <code>Storage</code> area as was
+  affected (i.e. session or local).</p>
 
 
   <h6>Event definition</h6>
 
-  <pre class="idl">interface <dfn>StorageEvent</dfn> : <span>Event</span> {
+  <pre class="idl">[Constructor(DOMString type, optional <span>StorageEventInit</span> eventInitDict)]
+interface <dfn>StorageEvent</dfn> : <span>Event</span> {
   readonly attribute DOMString <span title="dom-StorageEvent-key">key</span>;
   readonly attribute DOMString? <span title="dom-StorageEvent-oldValue">oldValue</span>;
   readonly attribute DOMString? <span title="dom-StorageEvent-newValue">newValue</span>;
   readonly attribute DOMString <span title="dom-StorageEvent-url">url</span>;
   readonly attribute <span>Storage</span>? <span title="dom-StorageEvent-storageArea">storageArea</span>;
-  void <span title="dom-StorageEvent-initStorageEvent">initStorageEvent</span>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, DOMString keyArg, DOMString? oldValueArg, DOMString? newValueArg, DOMString urlArg, <span>Storage</span>? storageAreaArg);
+};
+
+dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
+  DOMString key;
+  DOMString? oldValue;
+  DOMString? newValue;
+  DOMString url;
+  <span>Storage</span>? storageArea;
 };</pre>
 
-  <p>The <dfn
-  title="dom-StorageEvent-initStorageEvent"><code>initStorageEvent()</code></dfn>
-  method must initialize the event in a manner analogous to the
-  similarly-named method in the DOM Events interfaces. <a
-  href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
-
   <p>The <dfn title="dom-StorageEvent-key"><code>key</code></dfn>
-  attribute represents the key being changed.</p>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to the empty
+  string. It represents the key being changed.</p>
 
   <p>The <dfn
   title="dom-StorageEvent-oldValue"><code>oldValue</code></dfn>
-  attribute represents the old value of the key being changed.</p>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to null. It
+  represents the old value of the key being changed.</p>
 
   <p>The <dfn
   title="dom-StorageEvent-newValue"><code>newValue</code></dfn>
-  attribute represents the new value of the key being changed.</p>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to null. It
+  represents the new value of the key being changed.</p>
 
   <p>The <dfn title="dom-StorageEvent-url"><code>url</code></dfn>
-  attribute represents the address of the document whose key
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to the empty
+  string. It represents the address of the document whose key
   changed.</p>
 
   <p>The <dfn
   title="dom-StorageEvent-storageArea"><code>storageArea</code></dfn>
-  attribute represents the <code>Storage</code> object that was
-  affected.</p>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to null. It
+  represents the <code>Storage</code> object that was affected.</p>
 
 
 
@@ -102424,8 +102423,8 @@
    <code>Window</code> object), using the
    <code>PageTransitionEvent</code> interface, with the <code
    title="dom-PageTransitionEvent-persisted">persisted</code>
-   attribute set to false. This event must not bubble, must not be
-   cancelable, and has no default action.</p></li>
+   attribute initialized to false. This event must not bubble, must
+   not be cancelable, and has no default action.</p></li>
 
    <li><p>If the <code>Document</code> has any <span>pending
    application cache download process tasks</span>, then <span
@@ -108074,7 +108073,7 @@
 
    <dt><dfn title="attr-script-event"><code>event</code></dfn> on <code>script</code> elements</dt>
    <dt><dfn title="attr-script-for"><code>for</code></dfn> on <code>script</code> elements</dt>
-   <dd><p>Use DOM Events mechanisms to register event listeners. <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p></dd>
+   <dd><p>Use DOM Events mechanisms to register event listeners. <a href="#refsDOMCORE">[DOMCORE]</a></p></dd>
 
    <dt><dfn title="attr-table-datapagesize"><code>datapagesize</code></dfn> on <code>table</code> elements</dt>
    <dd><p>Unnecessary. Omit it altogether.</p></dd>

|