Permalink
Browse files

[giow] (0) Update Event interfaces to use constructors instead of ini…

…t*Event methods; remove some typedefs.

git-svn-id: http://svn.whatwg.org/webapps@6551 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent aa5ec77 commit 6e4bcf5630d08e03212ad4e1a3c78beecf2a92fa @Hixie Hixie committed Sep 10, 2011
Showing with 650 additions and 628 deletions.
  1. +246 −224 complete.html
  2. +146 −145 index
  3. +258 −259 source
View
470 complete.html
@@ -239,7 +239,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>Web Applications 1.0</h1>
- <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 9 September 2011</h2>
+ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 10 September 2011</h2>
</hgroup><dl><dt>Multiple-page version:</dt>
<dd><a href=http://www.whatwg.org/specs/web-apps/current-work/complete/>http://www.whatwg.org/specs/web-apps/current-work/complete/</a></dd>
<dt>One-page version:</dt>
@@ -3783,6 +3783,7 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<li><dfn id=event><code>Event</code></dfn> interface</li>
<li><dfn id=eventtarget><code>EventTarget</code></dfn> interface</li>
+ <li><dfn id=eventinit><code>EventInit</code></dfn> dictionary type</li>
<li>The <dfn id=concept-event-type title=concept-event-type>type</dfn> of an event</li>
<li><dfn id=dom-event-target title=dom-Event-target><code>target</code></dfn> attribute</li>
@@ -3842,6 +3843,7 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<ul class=brief><li><dfn id=uievent><code>UIEvent</code></dfn> interface</li>
<li><dfn id=mouseevent><code>MouseEvent</code></dfn> interface</li>
+ <li><dfn id=mouseeventinit><code>MouseEventInit</code></dfn> dictionary type</li>
<li><dfn id=event-click title=event-click><code>click</code></dfn> event</li>
@@ -26442,7 +26444,7 @@ <h4 id=media-elements><span class=secno>4.8.10 </span>Media elements</h4>
// tracks
readonly attribute <a href=#audiotracklist>AudioTrackList</a> <a href=#dom-media-audiotracks title=dom-media-audioTracks>audioTracks</a>;
readonly attribute <a href=#videotracklist>VideoTrackList</a> <a href=#dom-media-videotracks title=dom-media-videoTracks>videoTracks</a>;
- readonly attribute <a href=#texttracklist>TextTrackList</a> <a href=#dom-media-texttracks title=dom-media-textTracks>textTracks</a>;
+ readonly attribute <a href=#texttrack>TextTrack</a>[] <a href=#dom-media-texttracks title=dom-media-textTracks>textTracks</a>;
<a href=#mutabletexttrack>MutableTextTrack</a> <a href=#dom-media-addtexttrack title=dom-media-addTextTrack>addTextTrack</a>(DOMString kind, optional DOMString label, optional DOMString language);
};</pre>
@@ -31266,9 +31268,7 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
readonly attribute <a href=#texttrackcuelist>TextTrackCueList</a>? <a href=#dom-texttrack-activecues title=dom-TextTrack-activeCues>activeCues</a>;
attribute <a href=#function>Function</a>? <a href=#handler-texttrack-oncuechange title=handler-TextTrack-oncuechange>oncuechange</a>;
-};
-
-typedef <a href=#texttrack>TextTrack</a>[] <dfn id=texttracklist>TextTrackList</dfn>;</pre>
+};</pre>
<dl class=domintro><dt><var title="">textTrack</var> . <code title=dom-TextTrack-kind><a href=#dom-texttrack-kind>kind</a></code></dt>
<dd>
@@ -53598,10 +53598,10 @@ <h5 id=context-menus><span class=secno>4.11.4.3 </span><dfn>Context menus</dfn><
<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><a href=#mouseevent>MouseEvent</a></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><a href=#mouseevent>MouseEvent</a></code> user interaction event that was fired as
- part of the gesture that that was interpreted as a request for the
- context menu.</dd>
+ information of the event must be initialized to the same values as
+ the last <code><a href=#mouseevent>MouseEvent</a></code> user interaction event that was
+ fired as part of the gesture that that was interpreted as a request
+ for the context menu.</dd>
<dt>Otherwise</dt>
@@ -65026,8 +65026,8 @@ <h4 id=history-traversal><span class=secno>6.5.9 </span>History traversal</h4> <
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code> set to the
<code><a href=#window>Window</a></code> object), using the
<code><a href=#pagetransitionevent>PageTransitionEvent</a></code> interface, with the <code title=dom-PageTransitionEvent-persisted><a href=#dom-pagetransitionevent-persisted>persisted</a></code>
- attribute set to true. This event must not bubble, must not be
- cancelable, and has no default action.</li>
+ attribute initialized to true. This event must not bubble, must
+ not be cancelable, and has no default action.</li>
<!-- an interesting thing to test would be to traverse back
during onload, before the first pageshow has fired, and then to
@@ -65079,17 +65079,17 @@ <h4 id=history-traversal><span class=secno>6.5.9 </span>History traversal</h4> <
<li><p>Fire a <code title=event-popstate><a href=#event-popstate>popstate</a></code> event at
the <code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code>, using
- the <code><a href=#popstateevent>PopStateEvent</a></code> interface, with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code> attribute set to the
- value of <var title="">state</var>. This event must bubble but not
- be cancelable and has no default action.</li>
+ the <code><a href=#popstateevent>PopStateEvent</a></code> interface, with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code> attribute initialized
+ to the value of <var title="">state</var>. This event must bubble
+ but not be cancelable and has no default action.</li>
<li><p>If <var title="">hash changed</var> is true, then fire a
<code title=event-hashchange><a href=#event-hashchange>hashchange</a></code> event at the
<a href=#browsing-context>browsing context</a>'s <code><a href=#window>Window</a></code> object, using
- the <code><a href=#hashchangeevent>HashChangeEvent</a></code> interface, with the <code title=dom-HashChangeEvent-oldURL><a href=#dom-hashchangeevent-oldurl>oldURL</a></code> attribute set to
- <var title="">old URL</var> and the <code title=dom-HashChangeEvent-newURL><a href=#dom-hashchangeevent-newurl>newURL</a></code> attribute set to
- <var title="">new URL</var>. This event must bubble but not be
- cancelable and has no default action.</li>
+ the <code><a href=#hashchangeevent>HashChangeEvent</a></code> interface, with the <code title=dom-HashChangeEvent-oldURL><a href=#dom-hashchangeevent-oldurl>oldURL</a></code> attribute
+ initialized to <var title="">old URL</var> and the <code title=dom-HashChangeEvent-newURL><a href=#dom-hashchangeevent-newurl>newURL</a></code> attribute
+ initialized to <var title="">new URL</var>. This event must bubble
+ but not be cancelable and has no default action.</li>
<li><p>The <a href=#current-entry>current entry</a> is now the <i>specified
entry</i>.</li>
@@ -65106,9 +65106,13 @@ <h5 id=event-definitions><span class=secno>6.5.9.1 </span>Event definitions</h5>
is fired in certain cases when navigating to a <a href=#session-history-entry>session history
entry</a>.</p>
- <pre class=idl>interface <dfn id=popstateevent>PopStateEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#popstateeventinit>PopStateEventInit</a> eventInitDict)]
+interface <dfn id=popstateevent>PopStateEvent</dfn> : <a href=#event>Event</a> {
readonly attribute any <a href=#dom-popstateevent-state title=dom-PopStateEvent-state>state</a>;
- void <a href=#dom-popstateevent-initpopstateevent title=dom-PopStateEvent-initPopStateEvent>initPopStateEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any stateArg);
+};
+
+dictionary <dfn id=popstateeventinit>PopStateEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ any state;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code></dt>
@@ -65121,13 +65125,11 @@ <h5 id=event-definitions><span class=secno>6.5.9.1 </span>Event definitions</h5>
</dl><div class=impl>
- <p>The <dfn id=dom-popstateevent-initpopstateevent 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 id=dom-popstateevent-state 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><a href=#document>Document</a></code>.</p>
</div>
@@ -65137,10 +65139,15 @@ <h5 id=event-definitions><span class=secno>6.5.9.1 </span>Event definitions</h5>
entry</a> whose <a href=#url>URL</a> differs from that of the
previous one only in the fragment identifier.</p>
- <pre class=idl>interface <dfn id=hashchangeevent>HashChangeEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#hashchangeeventinit>HashChangeEventInit</a> eventInitDict)]
+interface <dfn id=hashchangeevent>HashChangeEvent</dfn> : <a href=#event>Event</a> {
readonly attribute DOMString <a href=#dom-hashchangeevent-oldurl title=dom-HashChangeEvent-oldURL>oldURL</a>;
readonly attribute DOMString <a href=#dom-hashchangeevent-newurl title=dom-HashChangeEvent-newURL>newURL</a>;
- void <a href=#dom-hashchangeevent-inithashchangeevent title=dom-HashChangeEvent-initHashChangeEvent>initHashChangeEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, DOMString oldURLArg, DOMString newURLArg);
+};
+
+dictionary <dfn id=hashchangeeventinit>HashChangeEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ DOMString oldURL;
+ DOMString newURL;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-HashChangeEvent-oldURL><a href=#dom-hashchangeevent-oldurl>oldURL</a></code></dt>
@@ -65164,19 +65171,18 @@ <h5 id=event-definitions><span class=secno>6.5.9.1 </span>Event definitions</h5>
</dl><div class=impl>
- <p>The <dfn id=dom-hashchangeevent-inithashchangeevent 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 id=dom-hashchangeevent-oldurl title=dom-HashChangeEvent-oldURL><code>oldURL</code></dfn>
- attribute represents context information for the event, specifically
- the URL of the <a href=#session-history-entry>session history entry</a> 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 <a href=#session-history-entry>session history entry</a> that was traversed
from.</p>
<p>The <dfn id=dom-hashchangeevent-newurl title=dom-HashChangeEvent-newURL><code>newURL</code></dfn>
- attribute represents context information for the event, specifically
- the URL of the <a href=#session-history-entry>session history entry</a> 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 <a href=#session-history-entry>session history entry</a> that was traversed to.</p>
</div>
@@ -65188,9 +65194,13 @@ <h5 id=event-definitions><span class=secno>6.5.9.1 </span>Event definitions</h5>
event is fired when traversing <em>from</em> a <a href=#session-history-entry>session history
entry</a>.</p>
- <pre class=idl>interface <dfn id=pagetransitionevent>PageTransitionEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#pagetransitioneventinit>PageTransitionEventInit</a> eventInitDict)]
+interface <dfn id=pagetransitionevent>PageTransitionEvent</dfn> : <a href=#event>Event</a> {
readonly attribute boolean <a href=#dom-pagetransitionevent-persisted title=dom-PageTransitionEvent-persisted>persisted</a>;
- void <a href=#dom-pagetransitionevent-initpagetransitionevent title=dom-PageTransitionEvent-initPageTransitionEvent>initPageTransitionEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, boolean persistedArg);
+};
+
+dictionary <dfn id=pagetransitioneventinit>PageTransitionEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ boolean persisted;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-PageTransitionEvent-persisted><a href=#dom-pagetransitionevent-persisted>persisted</a></code></dt>
@@ -65203,12 +65213,10 @@ <h5 id=event-definitions><span class=secno>6.5.9.1 </span>Event definitions</h5>
</dl><div class=impl>
- <p>The <dfn id=dom-pagetransitionevent-initpagetransitionevent 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 id=dom-pagetransitionevent-persisted 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>
@@ -65299,8 +65307,8 @@ <h4 id=unloading-documents><span class=secno>6.5.10 </span>Unloading documents</
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code> set to the
<code><a href=#window>Window</a></code> object), using the
<code><a href=#pagetransitionevent>PageTransitionEvent</a></code> interface, with the <code title=dom-PageTransitionEvent-persisted><a href=#dom-pagetransitionevent-persisted>persisted</a></code>
- attribute set to true. This event must not bubble, must not be
- cancelable, and has no default action.</li>
+ attribute initialized to true. This event must not bubble, must not
+ be cancelable, and has no default action.</li>
<li><p><i>Unload event</i>: <a href=#fire-a-simple-event>Fire a simple event</a> named
<code title=event-unload>unload</code> at the
@@ -68316,13 +68324,6 @@ <h5 id=generic-task-sources><span class=secno>7.1.4.3 </span>Generic task source
when an element is <a href=#insert-an-element-into-a-document title="insert an element into a
document">inserted into the document</a>.</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 id=user-interaction-task-source>user interaction task source</dfn></dt>
@@ -68946,13 +68947,13 @@ <h5 id=event-firing><span class=secno>7.1.6.3 </span>Event firing</h5>
otherwise stated), and which uses the <code><a href=#mouseevent>MouseEvent</a></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 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>
+ initialized to 0, its <code title="">ctrlKey</code>, <code title="">shiftKey</code>, <code title="">altKey</code>, and <code 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 id=fire-a-click-event title="fire a click event">Firing a <code title=event-click>click</code> event</dfn> means <a href=#fire-a-synthetic-mouse-event title="fire
a synthetic mouse event">firing a synthetic mouse event named <code title=event-click>click</code></a>, which bubbles and is
@@ -73169,10 +73170,13 @@ <h4 id=the-dragevent-interface><span class=secno>8.6.4 </span>The <code><a href=
<p>The drag-and-drop processing model involves several events. They
all use the <code><a href=#dragevent>DragEvent</a></code> interface.</p>
- <pre class=idl>interface <dfn id=dragevent>DragEvent</dfn> : <a href=#mouseevent>MouseEvent</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#drageventinit>DragEventInit</a> eventInitDict)]
+interface <dfn id=dragevent>DragEvent</dfn> : <a href=#mouseevent>MouseEvent</a> {
readonly attribute <a href=#datatransfer>DataTransfer</a>? <a href=#dom-dragevent-datatransfer title=dom-DragEvent-dataTransfer>dataTransfer</a>;
+};
- void <a href=#dom-dragevent-initdragevent title=dom-DragEvent-initDragEvent>initDragEvent</a>(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, <a href=#datatransfer>DataTransfer</a>? dataTransferArg);
+dictionary <dfn id=drageventinit>DragEventInit</dfn> : <a href=#mouseeventinit>MouseEventInit</a> {
+ <a href=#datatransfer>DataTransfer</a>? dataTransfer;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code></dt>
@@ -73185,14 +73189,11 @@ <h4 id=the-dragevent-interface><span class=secno>8.6.4 </span>The <code><a href=
</dl><div class=impl>
- <p>The <dfn id=dom-dragevent-initdragevent 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 id=dom-dragevent-datatransfer title=dom-DragEvent-dataTransfer><code>dataTransfer</code></dfn>
- attribute of the <code><a href=#dragevent>DragEvent</a></code> interface represents the
- context information for the event.</p>
+ attribute of the <code><a href=#dragevent>DragEvent</a></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>
@@ -73256,12 +73257,12 @@ <h4 id=the-dragevent-interface><span class=secno>8.6.4 </span>The <code><a href=
<p>Create a <code><a href=#dragevent>DragEvent</a></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><a href=#event-dragleave>dragleave</a></code> or <code title=event-dragend><a href=#event-dragend>dragend</a></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><a href=#dom-dragevent-datatransfer>dataTransfer</a></code>
- attribute set to <var title="">dataTransfer</var>, the
+ cancelable unless <var title="">e</var> is <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> or <code title=event-dragend><a href=#event-dragend>dragend</a></code>, and to have the <code 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><a href=#dom-dragevent-datatransfer>dataTransfer</a></code> attribute
+ initialized to <var title="">dataTransfer</var>, the
<code><a href=#datatransfer>DataTransfer</a></code> object created above.</p>
<!-- interaction event spec point -->
@@ -75128,7 +75129,7 @@ <h4 id=interface-definitions><span class=secno>9.3.2 </span>Interface definition
<pre class=idl>[<a href=#dom-mediastream title=dom-MediaStream>Constructor</a>(<a href=#mediastream>MediaStream</a> parentStream)]
interface <dfn id=mediastream>MediaStream</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute DOMString <a href=#dom-mediastream-label title=dom-MediaStream-label>label</a>;
- readonly attribute <a href=#mediastreamtracklist>MediaStreamTrackList</a> <a href=#dom-mediastream-tracks title=dom-MediaStream-tracks>tracks</a>;
+ readonly attribute <a href=#mediastreamtrack>MediaStreamTrack</a>[] <a href=#dom-mediastream-tracks title=dom-MediaStream-tracks>tracks</a>;
<a href=#mediastreamrecorder>MediaStreamRecorder</a> <a href=#dom-mediastream-record title=dom-MediaStream-record>record</a>();
<!--
@@ -75143,8 +75144,6 @@ <h4 id=interface-definitions><span class=secno>9.3.2 </span>Interface definition
void <a href=#dom-mediastream-stop title=dom-MediaStream-stop>stop</a>();
};
-typedef <a href=#mediastreamtrack>MediaStreamTrack</a>[] <dfn id=mediastreamtracklist>MediaStreamTrackList</dfn>;
-
interface <dfn id=mediastreamtrack>MediaStreamTrack</dfn> {
readonly attribute DOMString <a href=#dom-mediastreamtrack-kind title=dom-MediaStreamTrack-kind>kind</a>;
readonly attribute DOMString <a href=#dom-mediastreamtrack-label title=dom-MediaStreamTrack-label>label</a>;
@@ -75195,21 +75194,12 @@ <h4 id=interface-definitions><span class=secno>9.3.2 </span>Interface definition
<dd>
- <p>Returns a <code><a href=#mediastreamtracklist>MediaStreamTrackList</a></code> object representing
+ <p>Returns a <code><a href=#mediastreamtrack>MediaStreamTrack</a></code> array representing
the tracks that can be enabled and disabled.</p>
</dd>
- <dt><var title="">stream</var> . <code title=dom-MediaStream-tracks><a href=#dom-mediastream-tracks>tracks</a></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><a href=#dom-mediastream-tracks>tracks</a></code>[<var title="">index</var>]</dt>
<dd>
@@ -76677,7 +76667,7 @@ <h3 id=the-data-stream><span class=secno>9.5 </span>The data stream</h3>
<li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code>
interface, with the name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not
- cancelable, has no default action, and has a <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute whose value is
+ cancelable, has no default action, and has a <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute initialized to
<var title="">message</var>, and <a href=#queue-a-task>queue a task</a> to
dispatch the event at the <code><a href=#peerconnection>PeerConnection</a></code> object
responsible for this side of the <a href=#data-udp-media-stream>data UDP media
@@ -76766,25 +76756,29 @@ <h3 id=event-definitions-0><span class=secno>9.7 </span>Event definitions</h3>
<code title=event-MediaStream-removestream><a href=#event-mediastream-removestream>removestream</a></code> events
use the <code><a href=#mediastreamevent>MediaStreamEvent</a></code> interface:</p>
- <pre class=idl>interface <dfn id=mediastreamevent>MediaStreamEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#mediastreameventinit>MediaStreamEventInit</a> eventInitDict)]
+interface <dfn id=mediastreamevent>MediaStreamEvent</dfn> : <a href=#event>Event</a> {
readonly attribute <a href=#mediastream>MediaStream</a>? <a href=#dom-mediastreamevent-stream title=dom-MediaStreamEvent-stream>stream</a>;
- void <a href=#dom-mediastreamevent-initmediastreamevent title=dom-MediaStreamEvent-initMediaStreamEvent>initMediaStreamEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, <a href=#mediastream>MediaStream</a>? streamArg);
+};
+
+dictionary <dfn id=mediastreameventinit>MediaStreamEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ DOMString <a href=#mediastream>MediaStream</a>? stream;
};</pre>
<div class=impl>
- <p>The <dfn id=dom-mediastreamevent-initmediastreamevent 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 id=dom-mediastreamevent-stream title=dom-MediaStreamEvent-stream><code>stream</code></dfn>
- attribute represents the <code><a href=#mediastream>MediaStream</a></code> object associated with
- the event.</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><a href=#mediastream>MediaStream</a></code> object associated with the
+ event.</p>
<p><dfn id=fire-a-stream-event title="fire a stream event">Firing a stream event named <var title="">e</var></dfn> with a <code><a href=#mediastream>MediaStream</a></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><a href=#mediastreamevent>MediaStreamEvent</a></code> interface with the <code title=dom-MediaStreamEvent-stream><a href=#dom-mediastreamevent-stream>stream</a></code> attribute set to <var title="">stream</var>, must be created and dispatched at the given
- target.</p>
+ which uses the <code><a href=#mediastreamevent>MediaStreamEvent</a></code> interface with the
+ <code title=dom-MediaStreamEvent-stream><a href=#dom-mediastreamevent-stream>stream</a></code> attribute
+ initialized to <var title="">stream</var>, must be created and
+ dispatched at the given target.</p>
</div>
@@ -78509,11 +78503,11 @@ <h4 id=runtime-script-errors-0><span class=secno>10.2.6 </span>Runtime script er
the error occurred while handling a previous script error, the user
agent must <a href=#queue-a-task>queue a task</a> to fire an event that uses the
<code><a href=#errorevent>ErrorEvent</a></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><a href=#dom-errorevent-message>message</a></code>, <code title=dom-ErrorEvent-filename><a href=#dom-errorevent-filename>filename</a></code>, and <code title=dom-ErrorEvent-lineno><a href=#dom-errorevent-lineno>lineno</a></code> attributes set
+ cancelable, with its <code title=dom-ErrorEvent-message><a href=#dom-errorevent-message>message</a></code>, <code title=dom-ErrorEvent-filename><a href=#dom-errorevent-filename>filename</a></code>, and <code title=dom-ErrorEvent-lineno><a href=#dom-errorevent-lineno>lineno</a></code> attributes initialized
appropriately, at the <code><a href=#worker>Worker</a></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><a href=#worker>Worker</a></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><a href=#worker>Worker</a></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
@@ -78531,26 +78525,34 @@ <h4 id=runtime-script-errors-0><span class=secno>10.2.6 </span>Runtime script er
<p>The <a href=#task-source>task source</a> for the task mentioned above is the
<a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</p>
- <hr><pre class=idl>interface <dfn id=errorevent>ErrorEvent</dfn> : <a href=#event>Event</a> {
+ <hr><pre class=idl>[Constructor(DOMString type, optional <a href=#erroreventinit>ErrorEventInit</a> eventInitDict)]
+interface <dfn id=errorevent>ErrorEvent</dfn> : <a href=#event>Event</a> {
readonly attribute DOMString <a href=#dom-errorevent-message title=dom-ErrorEvent-message>message</a>;
readonly attribute DOMString <a href=#dom-errorevent-filename title=dom-ErrorEvent-filename>filename</a>;
readonly attribute unsigned long <a href=#dom-errorevent-lineno title=dom-ErrorEvent-lineno>lineno</a>;
- void <a href=#dom-errorevent-initerrorevent title=dom-ErrorEvent-initErrorEvent>initErrorEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, DOMString messageArg, DOMString filenameArg, unsigned long linenoArg);
-};</pre>
+};
- <p>The <dfn id=dom-errorevent-initerrorevent 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>
+dictionary <dfn id=erroreventinit>ErrorEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ DOMString message;
+ DOMString filename;
+ unsigned long lineno;
+};</pre>
- <p>The <dfn id=dom-errorevent-message title=dom-ErrorEvent-message><code>message</code></dfn>
- attribute represents the error message.</p>
+ <p>The <dfn id=dom-errorevent-message 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 id=dom-errorevent-filename title=dom-ErrorEvent-filename><code>filename</code></dfn>
- attribute represents the <a href=#absolute-url>absolute URL</a> 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 <a href=#absolute-url>absolute URL</a> of the script in
which the error originally occurred.</p>
<p>The <dfn id=dom-errorevent-lineno 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>
@@ -78834,11 +78836,11 @@ <h5 id=shared-workers-and-the-sharedworker-interface><span class=secno>10.2.7.3
<li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></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><a href=#dom-messageevent-data>data</a></code> attribute whose value
- is the empty string and has a <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code> attribute whose
- value is a <a href=#dfn-read-only-array title=dfn-read-only-array>read only</a>
- array containing only the newly created port, and <a href=#queue-a-task>queue a
- task</a> to dispatch the event at <var title="">worker
- global scope</var>.</li>
+ is initialized to the empty string and has a <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code> attribute whose
+ value is initialized to a <a href=#dfn-read-only-array title=dfn-read-only-array>read only</a> array containing
+ only the newly created port, and <a href=#queue-a-task>queue a task</a> to
+ dispatch the event at <var title="">worker global
+ scope</var>.</li>
<li>
@@ -78889,11 +78891,10 @@ <h5 id=shared-workers-and-the-sharedworker-interface><span class=secno>10.2.7.3
<li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></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><a href=#dom-messageevent-data>data</a></code> attribute whose value is
- the empty string and has a <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code> attribute whose value
- is a <a href=#dfn-read-only-array title=dfn-read-only-array>read only</a> array
- containing only the newly created port, and <a href=#queue-a-task>queue a
- task</a> to dispatch the event at <var title="">worker global
- scope</var>.</li>
+ initialized to the empty string and has a <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code> attribute whose value
+ is initialized to a <a href=#dfn-read-only-array title=dfn-read-only-array>read
+ only</a> array containing only the newly created port, and
+ <a href=#queue-a-task>queue a task</a> to dispatch the event at <var title="">worker global scope</var>.</li>
<li>
@@ -79166,13 +79167,21 @@ <h3 id=event-definitions-1><span class=secno>11.1 </span>Event definitions</h3>
<p>The following interface is defined for this event:</p>
- <pre class=idl>interface <dfn id=messageevent>MessageEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#messageeventinit>MessageEventInit</a> eventInitDict)]
+interface <dfn id=messageevent>MessageEvent</dfn> : <a href=#event>Event</a> {
readonly attribute any <a href=#dom-messageevent-data title=dom-MessageEvent-data>data</a>;
readonly attribute DOMString <a href=#dom-messageevent-origin title=dom-MessageEvent-origin>origin</a>;
readonly attribute DOMString <a href=#dom-messageevent-lasteventid title=dom-MessageEvent-lastEventId>lastEventId</a>;
readonly attribute <a href=#windowproxy>WindowProxy</a>? <a href=#dom-messageevent-source title=dom-MessageEvent-source>source</a>;
- readonly attribute <a href=#messageport>MessagePort</a>[] <a href=#dom-messageevent-ports title=dom-MessageEvent-ports>ports</a>;
- void <a href=#dom-messageevent-initmessageevent title=dom-MessageEvent-initMessageEvent>initMessageEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, <a href=#windowproxy>WindowProxy</a>? sourceArg, sequence&lt;<a href=#messageport>MessagePort</a>&gt; portsArg);
+ readonly attribute <a href=#messageport>MessagePort</a>[]? <a href=#dom-messageevent-ports title=dom-MessageEvent-ports>ports</a>;
+};
+
+dictionary <dfn id=messageeventinit>MessageEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ any data;
+ DOMString origin;
+ DOMString lastEventId;
+ <a href=#windowproxy>WindowProxy</a>? source;
+ <a href=#messageport>MessagePort</a>[]? ports;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code></dt>
@@ -79222,42 +79231,41 @@ <h3 id=event-definitions-1><span class=secno>11.1 </span>Event definitions</h3>
</dl><div class=impl>
- <p>The <dfn id=dom-messageevent-initmessageevent 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 id=dom-messageevent-data title=dom-MessageEvent-data><code>data</code></dfn>
- attribute represents the message being sent.</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 message being sent.</p>
<p>The <dfn id=dom-messageevent-origin 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 <a href=#server-sent-events>server-sent events</a> and
<a href=#web-messaging>cross-document messaging</a>, the <a href=#origin>origin</a> 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 id=dom-messageevent-lasteventid title=dom-MessageEvent-lastEventId><code>lastEventId</code></dfn>
- attribute represents, in <a href=#server-sent-events>server-sent events</a>, the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
+ 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 <a href=#server-sent-events>server-sent events</a>, the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
string</a> of the event source.</p>
<p>The <dfn id=dom-messageevent-source title=dom-MessageEvent-source><code>source</code></dfn> attribute
- represents, in <a href=#web-messaging>cross-document messaging</a>, the
+ must return the value it was initialized to. When the object is
+ created, this attribute must be initialized to null. It represents,
+ in <a href=#web-messaging>cross-document messaging</a>, the
<code><a href=#windowproxy>WindowProxy</a></code> of the <a href=#browsing-context>browsing context</a> of the
<code><a href=#window>Window</a></code> object from which the message came.</p>
<p>The <dfn id=dom-messageevent-ports title=dom-MessageEvent-ports><code>ports</code></dfn>
- attribute represents, in <a href=#web-messaging>cross-document messaging</a> and
+ 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 <a href=#web-messaging>cross-document messaging</a> and
<a href=#channel-messaging>channel messaging</a> the <code><a href=#messageport>MessagePort</a></code> array
being sent, if any.</p>
- <p>Except where otherwise specified, when the user agent creates and
- dispatches a <code title=event-message><a href=#event-message>message</a></code> event in the
- algorithms described in the following sections, the <code title=dom-MessageEvent-lastEventId><a href=#dom-messageevent-lasteventid>lastEventId</a></code> attribute
- must be the empty string, the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be the
- empty string, the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be
- null, and the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code>
- attribute must be null.</p>
-
</div>
@@ -79735,23 +79743,15 @@ <h4 id=event-stream-interpretation><span class=secno>11.2.5 </span>Interpreting
U+000A LINE FEED (LF) character, then remove the last character
from the <var title="">data</var> buffer.</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><a href=#messageevent>MessageEvent</a></code>
interface, with the event name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not
- cancelable, and has no default action. The <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute must be set to
- the value of the <var title="">data</var> buffer, the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be set
- to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an origin">Unicode
- serialization</a> of the <a href=#origin>origin</a> of the event
- stream's URL, and the <code title=dom-MessageEvent-lastEventId><a href=#dom-messageevent-lasteventid>lastEventId</a></code> attribute
- must be set to the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
+ cancelable, and has no default action. The <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute must be
+ initialized to the value of the <var title="">data</var> buffer,
+ the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute
+ must be initialized to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an
+ origin">Unicode serialization</a> of the <a href=#origin>origin</a> of
+ the event stream's URL, and the <code title=dom-MessageEvent-lastEventId><a href=#dom-messageevent-lasteventid>lastEventId</a></code> attribute
+ must be initialized to the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
string</a> of the event source.</li>
<li><p>If the <var title="">event name</var> buffer has a value
@@ -80562,7 +80562,7 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
</li>
- <li><p>Set <var title="">event</var>'s <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute to the
+ <li><p>Initialize <var title="">event</var>'s <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute to the
<a href=#unicode-serialization-of-an-origin title="Unicode serialization of an origin">Unicode
serialization</a> of the <a href=#origin>origin</a> of the
<a href=#url>URL</a> that was passed to the <code><a href=#websocket>WebSocket</a></code>
@@ -80571,17 +80571,17 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
<li>
<p>If <var title="">type</var> indicates that the data is Text,
- then set <var title="">event</var>'s <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute to <var title="">data</var>.
+ then initialize <var title="">event</var>'s <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></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><a href=#dom-websocket-binarytype>binaryType</a></code> is
- set to "<code title="">blob</code>", then set <var title="">event</var>'s <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute to a new
+ set to "<code title="">blob</code>", then initialize <var title="">event</var>'s <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute to a new
<code><a href=#blob>Blob</a></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><a href=#dom-websocket-binarytype>binaryType</a></code> is
- set to "<code title="">arraybuffer</code>", then set <var title="">event</var>'s <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute to a new
+ set to "<code title="">arraybuffer</code>", then initialize <var title="">event</var>'s <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute to a new
read-only <code><a href=#arraybuffer>ArrayBuffer</a></code> object whose contents are <var title="">data</var>. <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>
</li>
@@ -80627,12 +80627,12 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
<li><p>Create an event that uses the <code><a href=#closeevent>CloseEvent</a></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><a href=#dom-closeevent-wasclean>wasClean</a></code> attribute is set to
+ cancelable, has no default action, whose <code title=dom-CloseEvent-wasClean><a href=#dom-closeevent-wasclean>wasClean</a></code> attribute is initialized to
true if the connection closed <i title="">cleanly</i> and false
otherwise, whose <code title=dom-CloseEvent-code><a href=#dom-closeevent-code>code</a></code>
- attribute is set to <i><a href=#the-websocket-connection-close-code>the WebSocket connection close code</a></i>, and
+ attribute is initialized to <i><a href=#the-websocket-connection-close-code>the WebSocket connection close code</a></i>, and
whose <code title=dom-CloseEvent-reason><a href=#dom-closeevent-reason>reason</a></code> attribute
- is set to <i><a href=#the-websocket-connection-close-reason>the WebSocket connection close reason</a></i>
+ is initialized to <i><a href=#the-websocket-connection-close-reason>the WebSocket connection close reason</a></i>
<a href=#decoded-as-utf-8,-with-error-handling>decoded as UTF-8, with error handling</a>, and dispatch
the event at the <code><a href=#websocket>WebSocket</a></code> object. <a href=#refsWSP>[WSP]</a></li>
@@ -80643,27 +80643,34 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
<h5 id=event-definitions-2><span class=secno>11.3.3.1 </span>Event definitions</h5>
- <pre class=idl>interface <dfn id=closeevent>CloseEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#closeeventinit>CloseEventInit</a> eventInitDict)]
+interface <dfn id=closeevent>CloseEvent</dfn> : <a href=#event>Event</a> {
readonly attribute boolean <a href=#dom-closeevent-wasclean title=dom-CloseEvent-wasClean>wasClean</a>;
readonly attribute unsigned short <a href=#dom-closeevent-code title=dom-CloseEvent-code>code</a>;
readonly attribute DOMString <span title=dom-WebSocket-reason>reason</span>;
- void <a href=#dom-closeevent-initcloseevent title=dom-CloseEvent-initCloseEvent>initCloseEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, boolean wasCleanArg, unsigned short codeArg, DOMString reasonArg);
-};</pre>
+};
- <p>The <dfn id=dom-closeevent-initcloseevent 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 id=closeeventinit>CloseEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ boolean wasClean;
+ unsigned short code;
+ DOMString reason;
+};</pre>
<p>The <dfn id=dom-closeevent-wasclean 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 id=dom-closeevent-code 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 id=dom-closeevent-reason title=dom-CloseEvent-reason><code>reason</code></dfn>
- attribute represents the WebSocket connection close reason provided
+ 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>
@@ -80987,16 +80994,17 @@ <h4 id=posting-messages><span class=secno>11.4.3 </span>Posting messages</h4>
<p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code>
interface, with the event name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is
- not cancelable, and has no default action. The <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute must be set to
- the value of <var title="">message clone</var>, the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be
- set to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an
+ not cancelable, and has no default action. The <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute must be
+ initialized to the value of <var title="">message clone</var>, the
+ <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must
+ be initialized to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an
origin">Unicode serialization</a> of the <a href=#origin>origin</a> of
the script that invoked the method, the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be
- set to the <a href="#script's-global-object">script's global object</a>'s
- <code><a href=#windowproxy>WindowProxy</a></code> object, and the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></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 -->
+ initialized to the <a href="#script's-global-object">script's global object</a>'s
+ <code><a href=#windowproxy>WindowProxy</a></code> object, and the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></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>
@@ -81339,18 +81347,6 @@ <h4 id=message-ports><span class=secno>11.5.3 </span>Message ports</h4>
</li>
- <li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code>
- interface, with the name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not
- cancelable, and has no default action.</li>
-
- <li><p>Let the <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code>
- attribute of the event have the value of <var title="">message
- clone</var>.</li>
-
- <li><p>Let the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code>
- attribute of the event be the <var title="">new ports</var>
- array.</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.</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
@@ -81360,6 +81356,17 @@ <h4 id=message-ports><span class=secno>11.5.3 </span>Message ports</h4>
whether the ports have become useless, or in when the structured
clone algorithm runs scripts -->
+ <li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code>
+ interface, with the name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not
+ cancelable, and has no default action.</li>
+
+ <li><p>Let the <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code>
+ attribute of the event be initialized to the value of <var title="">message clone</var>.</li>
+
+ <li><p>Let the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code>
+ attribute of the event be initialized to the <var title="">new
+ ports</var> array.</li>
+
<li><p>Add the event to the <a href=#port-message-queue>port message queue</a> of <var title="">target port</var>.</li>
</ol><!--
@@ -81407,13 +81414,13 @@ <h4 id=message-ports><span class=secno>11.5.3 </span>Message ports</h4>
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>
@@ -81900,56 +81907,71 @@ <h4 id=the-storage-event><span class=secno>12.2.4 </span>The <code title=event-s
<p>If the event is being fired due to an invocation of the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code> or <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code> methods, the
event must have its <code title=dom-StorageEvent-key><a href=#dom-storageevent-key>key</a></code>
- attribute set to the name of the key in question, its <code title=dom-StorageEvent-oldValue><a href=#dom-storageevent-oldvalue>oldValue</a></code> attribute set to
+ attribute initialized to the name of the key in question, its <code title=dom-StorageEvent-oldValue><a href=#dom-storageevent-oldvalue>oldValue</a></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><a href=#dom-storageevent-newvalue>newValue</a></code> attribute set to
+ added, and its <code title=dom-StorageEvent-newValue><a href=#dom-storageevent-newvalue>newValue</a></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><a href=#dom-storage-clear>clear()</a></code> method, the event
- must have its <code title=dom-StorageEvent-key><a href=#dom-storageevent-key>key</a></code>, <code title=dom-StorageEvent-oldValue><a href=#dom-storageevent-oldvalue>oldValue</a></code>, and <code title=dom-StorageEvent-newValue><a href=#dom-storageevent-newvalue>newValue</a></code> attributes set to
- null.</p>
+ must have its <code title=dom-StorageEvent-key><a href=#dom-storageevent-key>key</a></code>, <code title=dom-StorageEvent-oldValue><a href=#dom-storageevent-oldvalue>oldValue</a></code>, and <code title=dom-StorageEvent-newValue><a href=#dom-storageevent-newvalue>newValue</a></code> attributes
+ initialized to null.</p>
- <p>In addition, the event must have its <code title=dom-StorageEvent-url><a href=#dom-storageevent-url>url</a></code> attribute set to <a href="#the-document's-address" title="the document's address">the address of the document</a>
- whose <code><a href=#storage-0>Storage</a></code> object was affected; and its <code title=dom-StorageEvent-storageArea><a href=#dom-storageevent-storagearea>storageArea</a></code> attribute
- set to the <code><a href=#storage-0>Storage</a></code> object from the <code><a href=#window>Window</a></code>
- object of the target <code><a href=#document>Document</a></code> that represents the same
- kind of <code><a href=#storage-0>Storage</a></code> area as was affected (i.e. session or
- local).</p>
+ <p>In addition, the event must have its <code title=dom-StorageEvent-url><a href=#dom-storageevent-url>url</a></code> attribute initialized to
+ <a href="#the-document's-address" title="the document's address">the address of the
+ document</a> whose <code><a href=#storage-0>Storage</a></code> object was affected; and
+ its <code title=dom-StorageEvent-storageArea><a href=#dom-storageevent-storagearea>storageArea</a></code>
+ attribute initialized to the <code><a href=#storage-0>Storage</a></code> object from the
+ <code><a href=#window>Window</a></code> object of the target <code><a href=#document>Document</a></code> that
+ represents the same kind of <code><a href=#storage-0>Storage</a></code> area as was
+ affected (i.e. session or local).</p>
<h5 id=event-definition-0><span class=secno>12.2.4.1 </span>Event definition</h5>
- <pre class=idl>interface <dfn id=storageevent>StorageEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#storageeventinit>StorageEventInit</a> eventInitDict)]
+interface <dfn id=storageevent>StorageEvent</dfn> : <a href=#event>Event</a> {
readonly attribute DOMString <a href=#dom-storageevent-key title=dom-StorageEvent-key>key</a>;
readonly attribute DOMString? <a href=#dom-storageevent-oldvalue title=dom-StorageEvent-oldValue>oldValue</a>;
readonly attribute DOMString? <a href=#dom-storageevent-newvalue title=dom-StorageEvent-newValue>newValue</a>;
readonly attribute DOMString <a href=#dom-storageevent-url title=dom-StorageEvent-url>url</a>;
readonly attribute <a href=#storage-0>Storage</a>? <a href=#dom-storageevent-storagearea title=dom-StorageEvent-storageArea>storageArea</a>;
- void <a href=#dom-storageevent-initstorageevent title=dom-StorageEvent-initStorageEvent>initStorageEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, DOMString keyArg, DOMString? oldValueArg, DOMString? newValueArg, DOMString urlArg, <a href=#storage-0>Storage</a>? storageAreaArg);
-};</pre>
+};
- <p>The <dfn id=dom-storageevent-initstorageevent 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 id=storageeventinit>StorageEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ DOMString key;
+ DOMString? oldValue;
+ DOMString? newValue;
+ DOMString url;
+ <a href=#storage-0>Storage</a>? storageArea;
+};</pre>
<p>The <dfn id=dom-storageevent-key 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 id=dom-storageevent-oldvalue 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 id=dom-storageevent-newvalue 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 id=dom-storageevent-url 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 id=dom-storageevent-storagearea title=dom-StorageEvent-storageArea><code>storageArea</code></dfn>
- attribute represents the <code><a href=#storage-0>Storage</a></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><a href=#storage-0>Storage</a></code> object that was affected.</p>
@@ -90428,8 +90450,8 @@ <h4 id=the-end><span class=secno>13.2.6 </span>The end</h4>
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code> set to the
<code><a href=#window>Window</a></code> object), using the
<code><a href=#pagetransitionevent>PageTransitionEvent</a></code> interface, with the <code title=dom-PageTransitionEvent-persisted><a href=#dom-pagetransitionevent-persisted>persisted</a></code>
- attribute set to false. This event must not bubble, must not be
- cancelable, and has no default action.</li>
+ attribute initialized to false. This event must not bubble, must
+ not be cancelable, and has no default action.</li>
<li><p>If the <code><a href=#document>Document</a></code> has any <a href=#pending-application-cache-download-process-tasks>pending
application cache download process tasks</a>, then <a href=#queue-a-task title="queue a task">queue</a> each such <a href=#concept-task title=concept-task>task</a> in the order they were added to
@@ -95325,7 +95347,7 @@ <h3 id=non-conforming-features><span class=secno>16.2 </span>Non-conforming feat
<dt><dfn id=attr-script-event title=attr-script-event><code>event</code></dfn> on <code><a href=#the-script-element>script</a></code> elements</dt>
<dt><dfn id=attr-script-for title=attr-script-for><code>for</code></dfn> on <code><a href=#the-script-element>script</a></code> elements</dt>
- <dd><p>Use DOM Events mechanisms to register event listeners. <a href=#refsDOMEVENTS>[DOMEVENTS]</a></dd>
+ <dd><p>Use DOM Events mechanisms to register event listeners. <a href=#refsDOMCORE>[DOMCORE]</a></dd>
<dt><dfn id=attr-table-datapagesize title=attr-table-datapagesize><code>datapagesize</code></dfn> on <code><a href=#the-table-element>table</a></code> elements</dt>
<dd><p>Unnecessary. Omit it altogether.</dd>
View
291 index
@@ -243,7 +243,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 9 September 2011</h2>
+ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 10 September 2011</h2>
</hgroup><dl><dt><strong>Web developer edition</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -3680,6 +3680,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn id=event><code>Event</code></dfn> interface</li>
<li><dfn id=eventtarget><code>EventTarget</code></dfn> interface</li>
+ <li><dfn id=eventinit><code>EventInit</code></dfn> dictionary type</li>
<li>The <dfn id=concept-event-type title=concept-event-type>type</dfn> of an event</li>
<li><dfn id=dom-event-target title=dom-Event-target><code>target</code></dfn> attribute</li>
@@ -3739,6 +3740,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<ul class=brief><li><dfn id=uievent><code>UIEvent</code></dfn> interface</li>
<li><dfn id=mouseevent><code>MouseEvent</code></dfn> interface</li>
+ <li><dfn id=mouseeventinit><code>MouseEventInit</code></dfn> dictionary type</li>
<li><dfn id=event-click title=event-click><code>click</code></dfn> event</li>
@@ -26309,7 +26311,7 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
// tracks
readonly attribute <a href=#audiotracklist>AudioTrackList</a> <a href=#dom-media-audiotracks title=dom-media-audioTracks>audioTracks</a>;
readonly attribute <a href=#videotracklist>VideoTrackList</a> <a href=#dom-media-videotracks title=dom-media-videoTracks>videoTracks</a>;
- readonly attribute <a href=#texttracklist>TextTrackList</a> <a href=#dom-media-texttracks title=dom-media-textTracks>textTracks</a>;
+ readonly attribute <a href=#texttrack>TextTrack</a>[] <a href=#dom-media-texttracks title=dom-media-textTracks>textTracks</a>;
<a href=#mutabletexttrack>MutableTextTrack</a> <a href=#dom-media-addtexttrack title=dom-media-addTextTrack>addTextTrack</a>(DOMString kind, optional DOMString label, optional DOMString language);
};</pre>
@@ -31133,9 +31135,7 @@ interface <dfn id=mediacontroller>MediaController</dfn> {
readonly attribute <a href=#texttrackcuelist>TextTrackCueList</a>? <a href=#dom-texttrack-activecues title=dom-TextTrack-activeCues>activeCues</a>;
attribute <a href=#function>Function</a>? <a href=#handler-texttrack-oncuechange title=handler-TextTrack-oncuechange>oncuechange</a>;
-};
-
-typedef <a href=#texttrack>TextTrack</a>[] <dfn id=texttracklist>TextTrackList</dfn>;</pre>
+};</pre>
<dl class=domintro><dt><var title="">textTrack</var> . <code title=dom-TextTrack-kind><a href=#dom-texttrack-kind>kind</a></code></dt>
<dd>
@@ -53465,10 +53465,10 @@ fur
<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><a href=#mouseevent>MouseEvent</a></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><a href=#mouseevent>MouseEvent</a></code> user interaction event that was fired as
- part of the gesture that that was interpreted as a request for the
- context menu.</dd>
+ information of the event must be initialized to the same values as
+ the last <code><a href=#mouseevent>MouseEvent</a></code> user interaction event that was
+ fired as part of the gesture that that was interpreted as a request
+ for the context menu.</dd>
<dt>Otherwise</dt>
@@ -64893,8 +64893,8 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code> set to the
<code><a href=#window>Window</a></code> object), using the
<code><a href=#pagetransitionevent>PageTransitionEvent</a></code> interface, with the <code title=dom-PageTransitionEvent-persisted><a href=#dom-pagetransitionevent-persisted>persisted</a></code>
- attribute set to true. This event must not bubble, must not be
- cancelable, and has no default action.</li>
+ attribute initialized to true. This event must not bubble, must
+ not be cancelable, and has no default action.</li>
<!-- an interesting thing to test would be to traverse back
during onload, before the first pageshow has fired, and then to
@@ -64946,17 +64946,17 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
<li><p>Fire a <code title=event-popstate><a href=#event-popstate>popstate</a></code> event at
the <code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code>, using
- the <code><a href=#popstateevent>PopStateEvent</a></code> interface, with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code> attribute set to the
- value of <var title="">state</var>. This event must bubble but not
- be cancelable and has no default action.</li>
+ the <code><a href=#popstateevent>PopStateEvent</a></code> interface, with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code> attribute initialized
+ to the value of <var title="">state</var>. This event must bubble
+ but not be cancelable and has no default action.</li>
<li><p>If <var title="">hash changed</var> is true, then fire a
<code title=event-hashchange><a href=#event-hashchange>hashchange</a></code> event at the
<a href=#browsing-context>browsing context</a>'s <code><a href=#window>Window</a></code> object, using
- the <code><a href=#hashchangeevent>HashChangeEvent</a></code> interface, with the <code title=dom-HashChangeEvent-oldURL><a href=#dom-hashchangeevent-oldurl>oldURL</a></code> attribute set to
- <var title="">old URL</var> and the <code title=dom-HashChangeEvent-newURL><a href=#dom-hashchangeevent-newurl>newURL</a></code> attribute set to
- <var title="">new URL</var>. This event must bubble but not be
- cancelable and has no default action.</li>
+ the <code><a href=#hashchangeevent>HashChangeEvent</a></code> interface, with the <code title=dom-HashChangeEvent-oldURL><a href=#dom-hashchangeevent-oldurl>oldURL</a></code> attribute
+ initialized to <var title="">old URL</var> and the <code title=dom-HashChangeEvent-newURL><a href=#dom-hashchangeevent-newurl>newURL</a></code> attribute
+ initialized to <var title="">new URL</var>. This event must bubble
+ but not be cancelable and has no default action.</li>
<li><p>The <a href=#current-entry>current entry</a> is now the <i>specified
entry</i>.</li>
@@ -64973,9 +64973,13 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
is fired in certain cases when navigating to a <a href=#session-history-entry>session history
entry</a>.</p>
- <pre class=idl>interface <dfn id=popstateevent>PopStateEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#popstateeventinit>PopStateEventInit</a> eventInitDict)]
+interface <dfn id=popstateevent>PopStateEvent</dfn> : <a href=#event>Event</a> {
readonly attribute any <a href=#dom-popstateevent-state title=dom-PopStateEvent-state>state</a>;
- void <a href=#dom-popstateevent-initpopstateevent title=dom-PopStateEvent-initPopStateEvent>initPopStateEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any stateArg);
+};
+
+dictionary <dfn id=popstateeventinit>PopStateEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ any state;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code></dt>
@@ -64988,13 +64992,11 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
</dl><div class=impl>
- <p>The <dfn id=dom-popstateevent-initpopstateevent 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 id=dom-popstateevent-state 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><a href=#document>Document</a></code>.</p>
</div>
@@ -65004,10 +65006,15 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
entry</a> whose <a href=#url>URL</a> differs from that of the
previous one only in the fragment identifier.</p>
- <pre class=idl>interface <dfn id=hashchangeevent>HashChangeEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#hashchangeeventinit>HashChangeEventInit</a> eventInitDict)]
+interface <dfn id=hashchangeevent>HashChangeEvent</dfn> : <a href=#event>Event</a> {
readonly attribute DOMString <a href=#dom-hashchangeevent-oldurl title=dom-HashChangeEvent-oldURL>oldURL</a>;
readonly attribute DOMString <a href=#dom-hashchangeevent-newurl title=dom-HashChangeEvent-newURL>newURL</a>;
- void <a href=#dom-hashchangeevent-inithashchangeevent title=dom-HashChangeEvent-initHashChangeEvent>initHashChangeEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, DOMString oldURLArg, DOMString newURLArg);
+};
+
+dictionary <dfn id=hashchangeeventinit>HashChangeEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ DOMString oldURL;
+ DOMString newURL;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-HashChangeEvent-oldURL><a href=#dom-hashchangeevent-oldurl>oldURL</a></code></dt>
@@ -65031,19 +65038,18 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
</dl><div class=impl>
- <p>The <dfn id=dom-hashchangeevent-inithashchangeevent 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 id=dom-hashchangeevent-oldurl title=dom-HashChangeEvent-oldURL><code>oldURL</code></dfn>
- attribute represents context information for the event, specifically
- the URL of the <a href=#session-history-entry>session history entry</a> 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 <a href=#session-history-entry>session history entry</a> that was traversed
from.</p>
<p>The <dfn id=dom-hashchangeevent-newurl title=dom-HashChangeEvent-newURL><code>newURL</code></dfn>
- attribute represents context information for the event, specifically
- the URL of the <a href=#session-history-entry>session history entry</a> 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 <a href=#session-history-entry>session history entry</a> that was traversed to.</p>
</div>
@@ -65055,9 +65061,13 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
event is fired when traversing <em>from</em> a <a href=#session-history-entry>session history
entry</a>.</p>
- <pre class=idl>interface <dfn id=pagetransitionevent>PageTransitionEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#pagetransitioneventinit>PageTransitionEventInit</a> eventInitDict)]
+interface <dfn id=pagetransitionevent>PageTransitionEvent</dfn> : <a href=#event>Event</a> {
readonly attribute boolean <a href=#dom-pagetransitionevent-persisted title=dom-PageTransitionEvent-persisted>persisted</a>;
- void <a href=#dom-pagetransitionevent-initpagetransitionevent title=dom-PageTransitionEvent-initPageTransitionEvent>initPageTransitionEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, boolean persistedArg);
+};
+
+dictionary <dfn id=pagetransitioneventinit>PageTransitionEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ boolean persisted;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-PageTransitionEvent-persisted><a href=#dom-pagetransitionevent-persisted>persisted</a></code></dt>
@@ -65070,12 +65080,10 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
</dl><div class=impl>
- <p>The <dfn id=dom-pagetransitionevent-initpagetransitionevent 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 id=dom-pagetransitionevent-persisted 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>
@@ -65166,8 +65174,8 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code> set to the
<code><a href=#window>Window</a></code> object), using the
<code><a href=#pagetransitionevent>PageTransitionEvent</a></code> interface, with the <code title=dom-PageTransitionEvent-persisted><a href=#dom-pagetransitionevent-persisted>persisted</a></code>
- attribute set to true. This event must not bubble, must not be
- cancelable, and has no default action.</li>
+ attribute initialized to true. This event must not bubble, must not
+ be cancelable, and has no default action.</li>
<li><p><i>Unload event</i>: <a href=#fire-a-simple-event>Fire a simple event</a> named
<code title=event-unload>unload</code> at the
@@ -68203,13 +68211,6 @@ interface <dfn id=navigatoronline>NavigatorOnLine</dfn> {
when an element is <a href=#insert-an-element-into-a-document title="insert an element into a
document">inserted into the document</a>.</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 id=user-interaction-task-source>user interaction task source</dfn></dt>
@@ -68833,13 +68834,13 @@ interface <dfn id=function>Function</dfn> {
otherwise stated), and which uses the <code><a href=#mouseevent>MouseEvent</a></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 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>
+ initialized to 0, its <code title="">ctrlKey</code>, <code title="">shiftKey</code>, <code title="">altKey</code>, and <code 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 id=fire-a-click-event title="fire a click event">Firing a <code title=event-click>click</code> event</dfn> means <a href=#fire-a-synthetic-mouse-event title="fire
a synthetic mouse event">firing a synthetic mouse event named <code title=event-click>click</code></a>, which bubbles and is
@@ -73065,10 +73066,13 @@ interface <dfn>FunctionObjectCallback</dfn> {
<p>The drag-and-drop processing model involves several events. They
all use the <code><a href=#dragevent>DragEvent</a></code> interface.</p>
- <pre class=idl>interface <dfn id=dragevent>DragEvent</dfn> : <a href=#mouseevent>MouseEvent</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#drageventinit>DragEventInit</a> eventInitDict)]
+interface <dfn id=dragevent>DragEvent</dfn> : <a href=#mouseevent>MouseEvent</a> {
readonly attribute <a href=#datatransfer>DataTransfer</a>? <a href=#dom-dragevent-datatransfer title=dom-DragEvent-dataTransfer>dataTransfer</a>;
+};
- void <a href=#dom-dragevent-initdragevent title=dom-DragEvent-initDragEvent>initDragEvent</a>(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, <a href=#datatransfer>DataTransfer</a>? dataTransferArg);
+dictionary <dfn id=drageventinit>DragEventInit</dfn> : <a href=#mouseeventinit>MouseEventInit</a> {
+ <a href=#datatransfer>DataTransfer</a>? dataTransfer;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code></dt>
@@ -73081,14 +73085,11 @@ interface <dfn>FunctionObjectCallback</dfn> {
</dl><div class=impl>
- <p>The <dfn id=dom-dragevent-initdragevent 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 id=dom-dragevent-datatransfer title=dom-DragEvent-dataTransfer><code>dataTransfer</code></dfn>
- attribute of the <code><a href=#dragevent>DragEvent</a></code> interface represents the
- context information for the event.</p>
+ attribute of the <code><a href=#dragevent>DragEvent</a></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>
@@ -73152,12 +73153,12 @@ interface <dfn>FunctionObjectCallback</dfn> {
<p>Create a <code><a href=#dragevent>DragEvent</a></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><a href=#event-dragleave>dragleave</a></code> or <code title=event-dragend><a href=#event-dragend>dragend</a></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><a href=#dom-dragevent-datatransfer>dataTransfer</a></code>
- attribute set to <var title="">dataTransfer</var>, the
+ cancelable unless <var title="">e</var> is <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> or <code title=event-dragend><a href=#event-dragend>dragend</a></code>, and to have the <code 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><a href=#dom-dragevent-datatransfer>dataTransfer</a></code> attribute
+ initialized to <var title="">dataTransfer</var>, the
<code><a href=#datatransfer>DataTransfer</a></code> object created above.</p>
<!-- interaction event spec point -->
@@ -75024,7 +75025,7 @@ function mediaStream(c,x,y,vid) {
<pre class=idl>[<a href=#dom-mediastream title=dom-MediaStream>Constructor</a>(<a href=#mediastream>MediaStream</a> parentStream)]
interface <dfn id=mediastream>MediaStream</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute DOMString <a href=#dom-mediastream-label title=dom-MediaStream-label>label</a>;
- readonly attribute <a href=#mediastreamtracklist>MediaStreamTrackList</a> <a href=#dom-mediastream-tracks title=dom-MediaStream-tracks>tracks</a>;
+ readonly attribute <a href=#mediastreamtrack>MediaStreamTrack</a>[] <a href=#dom-mediastream-tracks title=dom-MediaStream-tracks>tracks</a>;
<a href=#mediastreamrecorder>MediaStreamRecorder</a> <a href=#dom-mediastream-record title=dom-MediaStream-record>record</a>();
<!--
@@ -75039,8 +75040,6 @@ interface <dfn id=localmediastream>LocalMediaStream</dfn> : <a href=#mediastream
void <a href=#dom-mediastream-stop title=dom-MediaStream-stop>stop</a>();
};
-typedef <a href=#mediastreamtrack>MediaStreamTrack</a>[] <dfn id=mediastreamtracklist>MediaStreamTrackList</dfn>;
-
interface <dfn id=mediastreamtrack>MediaStreamTrack</dfn> {
readonly attribute DOMString <a href=#dom-mediastreamtrack-kind title=dom-MediaStreamTrack-kind>kind</a>;
readonly attribute DOMString <a href=#dom-mediastreamtrack-label title=dom-MediaStreamTrack-label>label</a>;
@@ -75091,21 +75090,12 @@ interface <dfn id=mediastreamtrack>MediaStreamTrack</dfn> {
<dd>
- <p>Returns a <code><a href=#mediastreamtracklist>MediaStreamTrackList</a></code> object representing
+ <p>Returns a <code><a href=#mediastreamtrack>MediaStreamTrack</a></code> array representing
the tracks that can be enabled and disabled.</p>
</dd>
- <dt><var title="">stream</var> . <code title=dom-MediaStream-tracks><a href=#dom-mediastream-tracks>tracks</a></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><a href=#dom-mediastream-tracks>tracks</a></code>[<var title="">index</var>]</dt>
<dd>
@@ -76573,7 +76563,7 @@ local.onaddstream = function (event) {
<li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code>
interface, with the name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not
- cancelable, has no default action, and has a <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute whose value is
+ cancelable, has no default action, and has a <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute initialized to
<var title="">message</var>, and <a href=#queue-a-task>queue a task</a> to
dispatch the event at the <code><a href=#peerconnection>PeerConnection</a></code> object
responsible for this side of the <a href=#data-udp-media-stream>data UDP media
@@ -76662,25 +76652,29 @@ local.onaddstream = function (event) {
<code title=event-MediaStream-removestream><a href=#event-mediastream-removestream>removestream</a></code> events
use the <code><a href=#mediastreamevent>MediaStreamEvent</a></code> interface:</p>
- <pre class=idl>interface <dfn id=mediastreamevent>MediaStreamEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#mediastreameventinit>MediaStreamEventInit</a> eventInitDict)]
+interface <dfn id=mediastreamevent>MediaStreamEvent</dfn> : <a href=#event>Event</a> {
readonly attribute <a href=#mediastream>MediaStream</a>? <a href=#dom-mediastreamevent-stream title=dom-MediaStreamEvent-stream>stream</a>;
- void <a href=#dom-mediastreamevent-initmediastreamevent title=dom-MediaStreamEvent-initMediaStreamEvent>initMediaStreamEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, <a href=#mediastream>MediaStream</a>? streamArg);
+};
+
+dictionary <dfn id=mediastreameventinit>MediaStreamEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ DOMString <a href=#mediastream>MediaStream</a>? stream;
};</pre>
<div class=impl>
- <p>The <dfn id=dom-mediastreamevent-initmediastreamevent 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 id=dom-mediastreamevent-stream title=dom-MediaStreamEvent-stream><code>stream</code></dfn>
- attribute represents the <code><a href=#mediastream>MediaStream</a></code> object associated with
- the event.</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><a href=#mediastream>MediaStream</a></code> object associated with the
+ event.</p>
<p><dfn id=fire-a-stream-event title="fire a stream event">Firing a stream event named <var title="">e</var></dfn> with a <code><a href=#mediastream>MediaStream</a></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><a href=#mediastreamevent>MediaStreamEvent</a></code> interface with the <code title=dom-MediaStreamEvent-stream><a href=#dom-mediastreamevent-stream>stream</a></code> attribute set to <var title="">stream</var>, must be created and dispatched at the given
- target.</p>
+ which uses the <code><a href=#mediastreamevent>MediaStreamEvent</a></code> interface with the
+ <code title=dom-MediaStreamEvent-stream><a href=#dom-mediastreamevent-stream>stream</a></code> attribute
+ initialized to <var title="">stream</var>, must be created and
+ dispatched at the given target.</p>
</div>
@@ -76761,13 +76755,21 @@ local.onaddstream = function (event) {
<p>The following interface is defined for this event:</p>
- <pre class=idl>interface <dfn id=messageevent>MessageEvent</dfn> : <a href=#event>Event</a> {
+ <pre class=idl>[Constructor(DOMString type, optional <a href=#messageeventinit>MessageEventInit</a> eventInitDict)]
+interface <dfn id=messageevent>MessageEvent</dfn> : <a href=#event>Event</a> {
readonly attribute any <a href=#dom-messageevent-data title=dom-MessageEvent-data>data</a>;
readonly attribute DOMString <a href=#dom-messageevent-origin title=dom-MessageEvent-origin>origin</a>;
readonly attribute DOMString <a href=#dom-messageevent-lasteventid title=dom-MessageEvent-lastEventId>lastEventId</a>;
readonly attribute <a href=#windowproxy>WindowProxy</a>? <a href=#dom-messageevent-source title=dom-MessageEvent-source>source</a>;
- readonly attribute <a href=#messageport>MessagePort</a>[] <a href=#dom-messageevent-ports title=dom-MessageEvent-ports>ports</a>;
- void <a href=#dom-messageevent-initmessageevent title=dom-MessageEvent-initMessageEvent>initMessageEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, <a href=#windowproxy>WindowProxy</a>? sourceArg, sequence&lt;<a href=#messageport>MessagePort</a>&gt; portsArg);
+ readonly attribute <a href=#messageport>MessagePort</a>[]? <a href=#dom-messageevent-ports title=dom-MessageEvent-ports>ports</a>;
+};
+
+dictionary <dfn id=messageeventinit>MessageEventInit</dfn> : <a href=#eventinit>EventInit</a> {
+ any data;
+ DOMString origin;
+ DOMString lastEventId;
+ <a href=#windowproxy>WindowProxy</a>? source;
+ <a href=#messageport>MessagePort</a>[]? ports;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code></dt>
@@ -76817,42 +76819,41 @@ local.onaddstream = function (event) {
</dl><div class=impl>
- <p>The <dfn id=dom-messageevent-initmessageevent 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 id=dom-messageevent-data title=dom-MessageEvent-data><code>data</code></dfn>
- attribute represents the message being sent.</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 message being sent.</p>
<p>The <dfn id=dom-messageevent-origin 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
<a href=#web-messaging>cross-document messaging</a>, the <a href=#origin>origin</a> 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 id=dom-messageevent-lasteventid title=dom-MessageEvent-lastEventId><code>lastEventId</code></dfn>
- attribute represents, in <span>server-sent events</span>, the <span title=concept-event-stream-last-event-id>last event ID
+ 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 id=dom-messageevent-source title=dom-MessageEvent-source><code>source</code></dfn> attribute
- represents, in <a href=#web-messaging>cross-document messaging</a>, the
+ must return the value it was initialized to. When the object is
+ created, this attribute must be initialized to null. It represents,
+ in <a href=#web-messaging>cross-document messaging</a>, the
<code><a href=#windowproxy>WindowProxy</a></code> of the <a href=#browsing-context>browsing context</a> of the
<code><a href=#window>Window</a></code> object from which the message came.</p>
<p>The <dfn id=dom-messageevent-ports title=dom-MessageEvent-ports><code>ports</code></dfn>
- attribute represents, in <a href=#web-messaging>cross-document messaging</a> and
+ 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 <a href=#web-messaging>cross-document messaging</a> and
<a href=#channel-messaging>channel messaging</a> the <code><a href=#messageport>MessagePort</a></code> array
being sent, if any.</p>
- <p>Except where otherwise specified, when the user agent creates and
- dispatches a <code title=event-message><a href=#event-message>message</a></code> event in the
- algorithms described in the following sections, the <code title=dom-MessageEvent-lastEventId><a href=#dom-messageevent-lasteventid>lastEventId</a></code> attribute
- must be the empty string, the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be the
- empty string, the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be
- null, and the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code>
- attribute must be null.</p>
-
</div>
@@ -77117,16 +77118,17 @@ function receiver(e) {
<p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code>
interface, with the event name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is
- not cancelable, and has no default action. The <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute must be set to
- the value of <var title="">message clone</var>, the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be
- set to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an
+ not cancelable, and has no default action. The <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute must be
+ initialized to the value of <var title="">message clone</var>, the
+ <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must
+ be initialized to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an
origin">Unicode serialization</a> of the <a href=#origin>origin</a> of
the script that invoked the method, the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be
- set to the <a href="#script's-global-object">script's global object</a>'s
- <code><a href=#windowproxy>WindowProxy</a></code> object, and the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></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 -->
+ initialized to the <a href="#script's-global-object">script's global object</a>'s
+ <code><a href=#windowproxy>WindowProxy</a></code> object, and the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></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>
@@ -77469,18 +77471,6 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
</li>
- <li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code>
- interface, with the name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not
- cancelable, and has no default action.</li>
-
- <li><p>Let the <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code>
- attribute of the event have the value of <var title="">message
- clone</var>.</li>
-
- <li><p>Let the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code>
- attribute of the event be the <var title="">new ports</var>
- array.</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.</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
@@ -77490,6 +77480,17 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
whether the ports have become useless, or in when the structured
clone algorithm runs scripts -->
+ <li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code>
+ interface, with the name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not
+ cancelable, and has no default action.</li>
+
+ <li><p>Let the <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code>
+ attribute of the event be initialized to the value of <var title="">message clone</var>.</li>
+
+ <li><p>Let the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code>
+ attribute of the event be initialized to the <var title="">new
+ ports</var> array.</li>
+
<li><p>Add the event to the <a href=#port-message-queue>port message queue</a> of <var title="">target port</var>.</li>
</ol><!--
@@ -77537,13 +77538,13 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
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>
@@ -85875,8 +85876,8 @@ document.body.appendChild(text);
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code> set to the
<code><a href=#window>Window</a></code> object), using the
<code><a href=#pagetransitionevent>PageTransitionEvent</a></code> interface, with the <code title=dom-PageTransitionEvent-persisted><a href=#dom-pagetransitionevent-persisted>persisted</a></code>
- attribute set to false. This event must not bubble, must not be
- cancelable, and has no default action.</li>
+ attribute initialized to false. This event must not bubble, must
+ not be cancelable, and has no default action.</li>
<li><p>If the <code><a href=#document>Document</a></code> has any <a href=#pending-application-cache-download-process-tasks>pending
application cache download process tasks</a>, then <a href=#queue-a-task title="queue a task">queue</a> each such <a href=#concept-task title=concept-task>task</a> in the order they were added to
@@ -90772,7 +90773,7 @@ if (s = prompt('What is your name?')) {
<dt><dfn id=attr-script-event title=attr-script-event><code>event</code></dfn> on <code><a href=#the-script-element>script</a></code> elements</dt>
<dt><dfn id=attr-script-for title=attr-script-for><code>for</code></dfn> on <code><a href=#the-script-element>script</a></code> elements</dt>
- <dd><p>Use DOM Events mechanisms to register event listeners. <a href=#refsDOMEVENTS>[DOMEVENTS]</a></dd>
+ <dd><p>Use DOM Events mechanisms to register event listeners. <a href=#refsDOMCORE>[DOMCORE]</a></dd>
<dt><dfn id=attr-table-datapagesize title=attr-table-datapagesize><code>datapagesize</code></dfn> on <code><a href=#the-table-element>table</a></code> elements</dt>
<dd><p>Unnecessary. Omit it altogether.</dd>
View
517 source
@@ -2694,6 +2694,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<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 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<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 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
// 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,9 +34098,7 @@ interface <dfn>MediaController</dfn> {
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">
@@ -60356,10 +60356,10 @@ fur
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 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<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 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<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 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
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 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<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 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
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 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<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 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
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 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<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 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<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 @@ interface <dfn>NavigatorOnLine</dfn> {
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 @@ interface <dfn>Function</dfn> {
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 @@ interface <dfn>FunctionObjectCallback</dfn> {
<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 @@ interface <dfn>FunctionObjectCallback</dfn> {
<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 @@ interface <dfn>FunctionObjectCallback</dfn> {
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 @@ function mediaStream(c,x,y,vid) {
<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 @@ 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>;
@@ -85698,21 +85691,12 @@ interface <dfn>MediaStreamTrack</dfn> {
<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 @@ local.onaddstream = function (event) {
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 @@ local.onaddstream = function (event) {
<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>
@@ -88803,11 +88788,11 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
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 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
<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>
@@ -89191,12 +89183,13 @@ interface <dfn>SharedWorker</dfn> : <span>AbstractWorker</span> {
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 @@ interface <dfn>SharedWorker</dfn> : <span>AbstractWorker</span> {
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 @@ interface <dfn>WorkerUtils</dfn> {
<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 @@ interface <dfn>WorkerUtils</dfn> {
<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,
@@ -89672,33 +89670,28 @@ interface <dfn>WorkerUtils</dfn> {
<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