HTML Standard Tracker

Filter

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
@@ -2687,20 +2687,21 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
      <li><dfn title="dom-Node-ownerDocument"><code>ownerDocument</code></dfn> attribute</li>
      <li><dfn title="dom-Node-childNodes"><code>childNodes</code></dfn> attribute</li>
      <li><dfn title="dom-Node-localName"><code>localName</code></dfn> attribute</li>
      <li><dfn title="dom-Node-parentNode"><code>parentNode</code></dfn> attribute</li>
      <li><dfn title="dom-Node-namespaceURI"><code>namespaceURI</code></dfn> attribute</li>
      <li><dfn title="dom-Element-tagName"><code>tagName</code></dfn> attribute</li>
      <li><dfn><code>textContent</code></dfn> attribute</li>
 
      <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>
 
      <li>The <dfn title="document's character encoding">character encoding</dfn> and <dfn title="concept-document-media-type">media type</dfn> of a <code>Document</code></li>
      <li>The distinction between <dfn>XML documents</dfn> and <dfn>HTML documents</dfn></li>
      <li>The terms <dfn>quirks mode</dfn>, <dfn>limited-quirks mode</dfn>, and <dfn>no-quirks mode</dfn></li>
      <li>The algorithm to <dfn title="concept-node-clone">clone</dfn> a <code>Node</code>, and the concept of <dfn title="concept-node-clone-ext">cloning steps</dfn> used by tat algorithm</li>
      <li>The concept of <span>base URL change steps</span> and the definition of what happens when an element is <span>affected by a base URL change</span>.</li>
 
@@ -2755,20 +2756,21 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
     construct a <code>DOMException</code> object whose code was set to
     23 and actually throw that object as an exception.</p>
 
     <p>The following features are defined in the DOM Events
     specification: <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
 
     <ul class="brief">
 
      <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>
 
     </ul>
 
 <!--END w3c-html--><!--
     <p>The following features are defined in the DOM
     Range specification: <a href="#refsDOMRANGE">[DOMRANGE]</a></p>
 
     <ul class="brief">
@@ -28445,21 +28447,21 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
 
   // controls
            attribute boolean <span title="dom-media-controls">controls</span>;
            attribute double <span title="dom-media-volume">volume</span>;
            attribute boolean <span title="dom-media-muted">muted</span>;
            attribute boolean <span title="dom-media-defaultMuted">defaultMuted</span>;
 
   // 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>
 
   <p>The <dfn>media element attributes</dfn>, <code
   title="attr-media-src">src</code>, <code
   title="attr-media-crossorigin">crossorigin</code>, <code
   title="attr-media-preload">preload</code>, <code
   title="attr-media-autoplay">autoplay</code>, 
   <code title="attr-media-mediagroup">mediagroup</code>, 
   <code title="attr-media-loop">loop</code>,
@@ -34089,23 +34091,21 @@ interface <dfn>MediaController</dfn> {
 
   const unsigned short <span title="dom-TextTrack-OFF">OFF</span> = 0;
   const unsigned short <span title="dom-TextTrack-HIDDEN">HIDDEN</span> = 1;
   const unsigned short <span title="dom-TextTrack-SHOWING">SHOWING</span> = 2;
            attribute unsigned short <span title="dom-TextTrack-mode">mode</span>;
 
   readonly attribute <span>TextTrackCueList</span>? <span title="dom-TextTrack-cues">cues</span>;
   readonly attribute <span>TextTrackCueList</span>? <span title="dom-TextTrack-activeCues">activeCues</span>;
 
            attribute <span>Function</span>? <span title="handler-TextTrack-oncuechange">oncuechange</span>;
-};
-
-typedef <span>TextTrack</span>[] <dfn>TextTrackList</dfn>;</pre>
+};</pre>
 
   <dl class="domintro">
 
    <dt><var title="">textTrack</var> . <code title="dom-TextTrack-kind">kind</code></dt>
    <dd>
     <p>Returns the <span>text track kind</span> string.</p>
    </dd>
 
    <dt><var title="">textTrack</var> . <code title="dom-TextTrack-label">label</code></dt>
    <dd>
@@ -60349,24 +60349,24 @@ fur
   list:</p>
 
   <dl class="switch">
 
    <dt>If the user requested a context menu using a pointing device</dt>
 
    <dd><p>The user agent must fire an event with the name <code
    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>
 
    <dd><p>The user agent must <span title="fire a synthetic mouse
    event">fire a synthetic mouse event named <code
    title="event-contextmenu">contextmenu</code></span> that bubbles
    and is cancelable at the element for which the menu was
    requested.</p></dd>
 
   </dl>
@@ -73823,22 +73823,22 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
      <i>specified entry</i>'s <code>Document</code> is "complete",
      <span>queue a task</span> to fire a <code
      title="event-pageshow">pageshow</code> event at the
      <code>Window</code> object of that <code>Document</code>, but
      with its <code title="dom-event-target">target</code> set to the
      <code>Document</code> object (and the <code
      title="dom-event-currentTarget">currentTarget</code> set to the
      <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
      traverse forward again, and see if we get _two_ pageshows. If so,
      it indicates that the history traversal task source has a higher
      priority than the DOM manipulation task source. -->
 
     </ol>
 
    </li>
@@ -73886,96 +73886,101 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
    title="">state</var> be a <span>structured clone</span> of that
    state object. Otherwise, let <var title="">state</var> be
    null.</p></li>
 
    <li><p>Set <code title="dom-history-state">history.state</code> to <var
    title="">state</var>.</p></li>
 
    <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>
 
   </ol>
 
   <p>The <span>task source</span> for the tasks mentioned above is the
   <span>DOM manipulation task source</span>.</p>
 
 
   <h5>Event definitions</h5>
 
   </div>
 
   <p>The <dfn title="event-popstate"><code>popstate</code></dfn> event
   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">
 
    <dt><var title="">event</var> . <code title="dom-PopStateEvent-state">state</code></dt>
 
    <dd>
 
     <p>Returns a copy of the information that was provided to <code
     title="dom-history-pushState">pushState()</code> or <code
     title="dom-history-replaceState">replaceState()</code>.</p>
 
    </dd>
 
   </dl>
 
   <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>
 
   <hr>
 
   <p>The <dfn title="event-hashchange"><code>hashchange</code></dfn>
   event is fired when navigating to a <span>session history
   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">
 
    <dt><var title="">event</var> . <code title="dom-HashChangeEvent-oldURL">oldURL</code></dt>
 
    <dd>
 
     <p>Returns the <span>URL</span> of the <span>session history
     entry</span> that was previously current.</p>
@@ -73990,77 +73995,74 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
     <p>Returns the <span>URL</span> of the <span>session history
     entry</span> that is now current.</p>
 
    </dd>
 
   </dl>
 
   <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>
 
   <hr>
 
   <p>The <dfn title="event-pageshow"><code>pageshow</code></dfn> event
   is fired when traversing <em>to</em> a <span>session history
   entry</span>.</p>
 
   <p>The <dfn title="event-pagehide"><code>pagehide</code></dfn>
   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">
 
    <dt><var title="">event</var> . <code title="dom-PageTransitionEvent-persisted">persisted</code></dt>
 
    <dd>
 
     <p>Returns false if the page is newly being loaded (and the <code title="event-load">load</code> event will fire). Otherwise, returns true.</p>
 
    </dd>
 
   </dl>
 
   <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>
 
 
 
   <h4>Unloading documents</h4>
 
   <div class="impl">
 
   <p>A <code>Document</code> has a <var
@@ -74158,22 +74160,22 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
   <ol>
 
    <li><p>Fire a <code title="event-pagehide">pagehide</code> event at
    the <code>Window</code> object of the <code>Document</code>, but
    with its <code title="dom-event-target">target</code> set to the
    <code>Document</code> object (and the <code
    title="dom-event-currentTarget">currentTarget</code> set to the
    <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
    <code>Document</code>'s <code>Window</code> object.</p></li>
 
    <li><p>Release the <span>storage mutex</span>.</p></li>
 
    <li><p>If any event listeners were triggered by the earlier
    <i>unload event</i> step, then set the <code>Document</code>
    object's <var
@@ -77688,27 +77690,20 @@ interface <dfn>NavigatorOnLine</dfn> {
 
    <dt>The <dfn>DOM manipulation task source</dfn></dt>
 
    <dd>
 
     <p>This <span>task source</span> is used for features that react
     to DOM manipulations, such as things that happen asynchronously
     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>
 
    <dd>
 
     <p>This <span>task source</span> is used for features that react
     to user interaction, for example keyboard or mouse input.</p>
 
     <p>Asynchronous events sent in response to user input (e.g. <code
@@ -78434,29 +78429,30 @@ interface <dfn>Function</dfn> {
 
   <p><dfn title="fire a synthetic mouse event">Firing a synthetic
   mouse event named <var title="">e</var></dfn> 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>MouseEvent</code>
   interface, must be created and dispatched at the given target. The
   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
   a synthetic mouse event">firing a synthetic mouse event named <code
   title="event-click">click</code></span>, which bubbles and is
   cancelable.</p>
 
   <p>The default action of these events is to do nothing except where
   otherwise stated.</p>
 
@@ -83323,51 +83319,49 @@ interface <dfn>FunctionObjectCallback</dfn> {
 
   </div>
 
 
 
   <h4>The <code>DragEvent</code> interface</h4>
 
   <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">
 
    <dt><var title="">event</var> . <code title="dom-DragEvent-dataTransfer">dataTransfer</code></dt>
 
    <dd>
 
     <p>Returns the <code>DataTransfer</code> object for the event.</p>
 
    </dd>
 
   </dl>
 
   <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>
 
   <div class="impl">
 
   <p>When a user agent is required to <dfn>fire a DND event</dfn>
   named <var title="">e</var> at an element, using a particular
   <span>drag data store</span>, the user agent must run the following
   steps:</p>
 
@@ -83456,26 +83450,27 @@ interface <dfn>FunctionObjectCallback</dfn> {
 
    </li>
 
    <li>
 
     <p>Create a <code>DragEvent</code> object and initialize it to
     have the given name <var title="">e</var>, to bubble, to be
     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 -->
 
     <p>If there is no relevant pointing device, the 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.</p>
 
    </li>
@@ -85622,37 +85617,35 @@ function mediaStream(c,x,y,vid) {
 
   <!-- v2: support reading the bits from the stream directly, for use
   with streaming over WebSocket? Or do we rely on FileReader for that?
   sicking suggests defining a DataStream or BlobStream interface that
   you can get from a Stream to get to the underlying data; such an
   object would then be readable using the File API -->
 
   <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>();
 <!--
   const unsigned short <span title="dom-MediaStream-LOADING">LOADING</span> = 0; -->
   const unsigned short <span title="dom-MediaStream-LIVE">LIVE</span> = 1;
   const unsigned short <span title="dom-MediaStream-ENDED">ENDED</span> = 2;
   readonly attribute unsigned short <span title="dom-MediaStream-readyState">readyState</span>;
            attribute <span>Function</span>? <span title="handler-MediaStream-onended">onended</span>;
 };
 
 interface <dfn>LocalMediaStream</dfn> : <span>MediaStream</span> {
   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>;
            attribute boolean <span title="dom-MediaStreamTrack-enabled">enabled</span>;
 };</pre>
 
   <dl class="domintro">
 
    <dt><var title="">stream</var>  = new <code title="dom-MediaStream">MediaStream</code>( <var title="">parentStream</var> )</dt>
 
@@ -85691,35 +85684,26 @@ interface <dfn>MediaStreamTrack</dfn> {
 
     <p>Permanently stops the generation of media data for the stream.</p>
 
    </dd>
 
 
    <dt><var title="">stream</var> . <code title="dom-MediaStream-tracks">tracks</code></dt>
 
    <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>
 
     <p>Returns the specified <code>MediaStreamTrack</code> object.</p>
 
    </dd>
 
 
    <dt><var title="">track</var> . <code title="dom-MediaStreamTrack-kind">kind</code></dt>
@@ -87433,21 +87417,21 @@ local.onaddstream = function (event) {
    raw message</var>.</p></li>
 
    <li><p>Let <var title="">message</var> be <var title="">raw
    message</var> <span>decoded as UTF-8, with error
    handling</span>.</p></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, 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
    stream</span>.</p></li>
 
   </ol>
 
   <p class="note">Though described above as being computed for each
   packet, the <var title="">ice-key</var>, <var
   title="">hash-key</var>, and <var title="">mask-key</var> values can
@@ -87528,46 +87512,47 @@ local.onaddstream = function (event) {
   reference, I haven't bothered to work out the exact rules. If you do
   change this, see the /unloading document cleanup steps/. -->
 
 
   <h3>Event definitions</h3>
 
   <p>The <code title="event-MediaStream-addstream">addstream</code> and
   <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>
-
-  <p>The <dfn title="dom-MediaStreamEvent-stream"><code>stream</code></dfn>
-  attribute represents the <code>MediaStream</code> object associated with
-  the event.</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><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>
 
 
   <h3 id="mediastreamevents">Event Summary</h3>
 
   <!--END dev-html--><p><i>This section is non-normative.</i></p><!--START dev-html-->
 
   <p>The following event fires on <code>MediaStream</code> objects:</p>
 
@@ -88796,25 +88781,25 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
 
   <p>For dedicated workers, if the error is still <i
   title="concept-error-nothandled">not handled</i> afterwards, or if
   the error occurred while handling a previous script error, the user
   agent must <span>queue a task</span> to fire an event that uses the
   <code>ErrorEvent</code> interface, with the name <code
   title="event-error">error</code>, that doesn't bubble and is
   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
   <code>Worker</code> object has been disentangled (i.e. if the parent
   worker has been terminated), then the user agent must act as if the
   <code>Worker</code> object had no <code
   title="event-error">error</code> event handler and as if that
   worker's <code
   title="handler-WorkerGlobalScope-onerror">onerror</code> attribute
   was null, but must otherwise act as described above.</p>
@@ -88822,43 +88807,50 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
   <p class="note">Thus, error reports proagate up to the chain of
   dedicated workers up to the original <code>Document</code>, even if
   some of the workers along this chain have been terminated and
   garbage collected.</p>
 
   <p>The <span>task source</span> for the task mentioned above is the
   <span>DOM manipulation task source</span>.</p>
 
   <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>
-
-  <p>The <dfn title="dom-ErrorEvent-message"><code>message</code></dfn>
-  attribute represents the error message.</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-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>
 
 
 
   <h4>Creating workers</h4>
 
   <h5>The <code>AbstractWorker</code> abstract interface</h5>
 
   <pre class="idl">[Supplemental, NoInterfaceObject]
 interface <dfn>AbstractWorker</dfn> : <span>EventTarget</span> {
@@ -89184,26 +89176,27 @@ interface <dfn>SharedWorker</dfn> : <span>AbstractWorker</span> {
        and <var title="">inside port</var>.</p></li>
 
        <li><p>Return <var title="">worker</var> and perform the next
        step asynchronously.</p></li>
 
        <li><p>Create an event that uses the <code>MessageEvent</code>
        interface, with the name <code
        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>
 
         <p><span title="add a document to the worker's documents">Add to
         <var title="">worker global scope</var>'s list of <span>the
         worker's <code>Document</code>s</span></span> the
         <code>Document</code> objects in <var title="">docs</var>.</p>
 
        </li>
 
@@ -89251,26 +89244,26 @@ interface <dfn>SharedWorker</dfn> : <span>AbstractWorker</span> {
    </li>
 
    <li><p>Return <var title="">worker</var> and perform the remaining
    steps asynchronously.</p></li>
 
    <li><p>Create an event that uses the <code>MessageEvent</code>
    interface, with the name <code
    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>
 
     <p><span title="add a document to the worker's documents">Add to
     <var title="">worker global scope</var>'s list of <span>the
     worker's <code>Document</code>s</span></span> the
     <code>Document</code> objects in <var title="">docs</var>.</p>
 
    </li>
 
@@ -89584,27 +89577,35 @@ interface <dfn>WorkerUtils</dfn> {
   <span>channel messaging</span> use the <dfn
   title="event-message"><code>message</code></dfn> event.
   <!--END complete--><!--END epub-->
   <a href="#refsEVENTSOURCE">[EVENTSOURCE]</a>
   <a href="#refsWEBSOCKET">[WEBSOCKET]</a>
   <!--START complete--><!--START epub-->
   </p>
 
   <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">
 
    <dt><var title="">event</var> . <code title="dom-MessageEvent-data">data</code></dt>
 
    <dd>
 
     <p>Returns the data of the message.</p>
 
@@ -89645,67 +89646,59 @@ interface <dfn>WorkerUtils</dfn> {
     <p>Returns the <code>MessagePort</code> array sent with the
     message, for <span>cross-document messaging</span> and
     <span>channel messaging</span>.</p>
 
    </dd>
 
   </dl>
 
   <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 represents the message being sent.</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-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,
   and port of the document, but not its path or fragment
   identifier).</p>
 
   <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-->
 
   </div><!--data-component-->
 
 <!--START w3c-html--><!--POSTMSG-->
 <!--END html--><!--END dev-html--><!--END w3c-html-->
 
 
@@ -90244,41 +90237,32 @@ any-char      = %x0000-0009 / %x000B-000C / %x000E-10FFFF
 
    <li><p>If the <var title="">data</var> buffer is an empty string,
    set the <var title="">data</var> buffer and the <var title="">event
    name</var> buffer to the empty string and abort these
    steps.</p></li>
 
    <li><p>If the <var title="">data</var> buffer's last character is a
    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>
 
    <li><p>If the <var title="">event name</var> buffer has a value
    other than the empty string, change the <span
    title="concept-event-type">type</span> of the newly created event
    to equal the value of the <var title="">event name</var>
    buffer.</p></li>
 
    <li><p>Set the <var title="">data</var> buffer and the <var
@@ -91232,45 +91216,45 @@ socket.onopen = function () {
 
    <li>
 
     <p>Let <var title="">event</var> be 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.</p>
 
    </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
    <span>URL</span> that was passed to the <code>WebSocket</code>
    object's constructor.</p></li>
 
    <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>
     as its raw data. <a href="#refsFILEAPI">[FILEAPI]</a></p>
 
     <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
     title="">data</var>. <a
     href="#refsTYPEDARRAY">[TYPEDARRAY]</a></p>
 
    </li>
 
    <li>
 
@@ -91325,65 +91309,69 @@ socket.onopen = function () {
    connection</i> or <i>the WebSocket connection is closed</i> <dfn
    title="concept-websocket-close-fail">with prejudice</dfn>,
    <span>fire a simple event</span> named <code title="">error</code>
    at the <code>WebSocket</code> object. <a
    href="#refsWSP">[WSP]</a></p></li>
 
    <li><p>Create an event that uses the <code>CloseEvent</code>
    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>
 
   </ol>
 
   <p>The <span>task source</span> for all <span
   title="concept-task">tasks</span> <span title="queue a
   task">queued</span> in this section is the <dfn>WebSocket task
   source</dfn>.</p>
 
 
   <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);
-};</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>
+dictionary <dfn>CloseEventInit</dfn> : <span>EventInit</span> {
+  boolean wasClean;
+  unsigned short code;
+  DOMString reason;
+};</pre>
 
   <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>
 
 
 
   <h5>Garbage collection</h5>
 
   <p>A <code>WebSocket</code> object whose <code
   title="dom-WebSocket-readyState">readyState</code> attribute's value
   was set to <code title="dom-WebSocket-CONNECTING">CONNECTING</code>
   (0) as of the last time the <span>event loop</span> started
@@ -91745,33 +91733,33 @@ function receiver(e) {
     is made.</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 <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>
 
    <li>
 
     <p><span>Queue a task</span> to dispatch the event created in the
     previous step at the <code>Window</code> object on which the
     method was invoked. The <span>task source</span> for this <span
     title="concept-task">task</span> is the <span>posted message task
     source</span>.</p>
@@ -92161,43 +92149,43 @@ interface <dfn>MessageChannel</dfn> {
    <li>
 
     <p>Let <var title="">message clone</var> be the result of
     obtaining a <span>structured clone</span> of the <var
     title="">message</var> argument, with <var title="">transfer
     map</var> as the <i>transfer map</i>. If this throws an exception,
     then throw that exception and abort these steps.</p>
 
    </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
    target port because this can happen at a moment's notice. we don't
    return false because if the port is _about_ to be closed, the
    message might not be listened for anyway. we don't do this before
    the steps above because otherwise you can tell the difference (in
    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>
 
   </ol>
 
 <!--
   <hr>
 
   <p>The <dfn
   title="dom-MessagePort-startConversation"><code>startConversation(<var
@@ -92234,27 +92222,27 @@ interface <dfn>MessageChannel</dfn> {
 
    <li><p><span>Entangle</span> the <var title="">port1</var> and <var
    title="">port2</var> objects.</p></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
+   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>
 
    <li><p>Add the event to the <span>port message queue</span> of <var
    title="">target port</var>.</p></li>
 
   </ol>
 -->
   <hr>
@@ -92780,82 +92768,93 @@ interface <dfn>WindowLocalStorage</dfn> {
   by the <span>event loop</span> until the <code>Document</code>
   becomes <span>fully active</span> again.</p>
 
   <p>The <span>task source</span> for this task is the <span>DOM
   manipulation task source</span>.</p>
 
   <p>If the event is being fired due to an invocation of the <code
   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>
 
   <p>Otherwise, if the event is being fired due to an invocation of
   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);
-};</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>
+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-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>
 
 
 
   <h5>Threads</h5>
 
   <p>Because of <a href="#localStorageMutex">the use</a> of the
   <span>storage mutex</span>, multiple browsing contexts will be able
   to access the local storage areas simultaneously in such a manner
   that scripts cannot detect any concurrent script execution.</p>
 
@@ -102417,22 +102416,22 @@ document.body.appendChild(text);
    <li><p>If the <code>Document</code> is in a <span>browsing
    context</span>, then <span>queue a task</span> to fire a <code
    title="event-pageshow">pageshow</code> event at the
    <code>Window</code> object of the <code>Document</code>, but with
    its <code title="dom-event-target">target</code> set to the
    <code>Document</code> object (and the <code
    title="dom-event-currentTarget">currentTarget</code> set to the
    <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
    title="queue a task">queue</span> each such <span
    title="concept-task">task</span> in the order they were added to
    the list of <span>pending application cache download process
    tasks</span>, and then empty the list of <span>pending application
    cache download process tasks</span>. The <span>task source</span>
    for these <span title="concept-task">tasks</span> is the
    <span>networking task source</span>.</p></li>
@@ -108067,21 +108066,21 @@ if (s = prompt('What is your name?')) {
    <dd><p>Use the <code title="attr-param-name">name</code> and <code
    title="attr-param-value">value</code> attributes without declaring
    value types.</p></dd>
 
    <dt><dfn title="attr-script-language"><code>language</code></dfn> on <code>script</code> elements (except as noted in the previous section)</dt>
    <dd><p>Use the <code title="attr-script-type">type</code> attribute
    instead.</p></dd>
 
    <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>
 
    <dt><dfn title="attr-table-summary"><code>summary</code></dfn> on <code>table</code> elements</dt><!-- 2.65% pages -->
    <dd><p>Use one of the <a
    href="#table-descriptions-techniques">techniques for describing
    tables</a> given in the <code>table</code> section
    instead.</p></dd>
 

|