Skip to content

Commit

Permalink
[giow] (2) Move the Web to a world where things that implement EventT…
Browse files Browse the repository at this point in the history
…arget just inherit from it. I, for one, now welcome our new EventTarget overlords.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12574

git-svn-id: http://svn.whatwg.org/webapps@6378 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 5, 2011
1 parent 39e3b96 commit 41451cc
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 75 deletions.
47 changes: 18 additions & 29 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -31174,7 +31174,7 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>

</div>

<hr><pre class=idl>interface <dfn id=texttrack>TextTrack</dfn> {
<hr><pre class=idl>interface <dfn id=texttrack>TextTrack</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute DOMString <a href=#dom-texttrack-kind title=dom-TextTrack-kind>kind</a>;
readonly attribute DOMString <a href=#dom-texttrack-label title=dom-TextTrack-label>label</a>;
readonly attribute DOMString <a href=#dom-texttrack-language title=dom-TextTrack-language>language</a>;
Expand All @@ -31197,7 +31197,6 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>

attribute <a href=#function>Function</a>? <a href=#handler-texttrack-oncuechange title=handler-TextTrack-oncuechange>oncuechange</a>;
};
<a href=#texttrack>TextTrack</a> implements <a href=#eventtarget>EventTarget</a>;

typedef <a href=#texttrack>TextTrack</a>[] <dfn id=texttracklist>TextTrackList</dfn>;</pre>

Expand Down Expand Up @@ -31603,7 +31602,7 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
<!--TTVTT-->
[<a href=#dom-texttrackcue title=dom-TextTrackCue>Constructor</a>(in DOMString id, in double startTime, in double endTime, in DOMString text, in optional DOMString settings, in optional boolean pauseOnExit)]
<!--TTVTT-->
interface <dfn id=texttrackcue>TextTrackCue</dfn> {
interface <dfn id=texttrackcue>TextTrackCue</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute <a href=#texttrack>TextTrack</a>? <a href=#dom-texttrackcue-track title=dom-TextTrackCue-track>track</a>;
readonly attribute DOMString <a href=#dom-texttrackcue-id title=dom-TextTrackCue-id>id</a>;

Expand All @@ -31625,8 +31624,7 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>

attribute <a href=#function>Function</a>? <a href=#handler-texttrackcue-onenter title=handler-TextTrackCue-onenter>onenter</a>;
attribute <a href=#function>Function</a>? <a href=#handler-texttrackcue-onexit title=handler-TextTrackCue-onexit>onexit</a>;
};
<a href=#texttrackcue>TextTrackCue</a> implements <a href=#eventtarget>EventTarget</a>;</pre>
};</pre>

<dl class=domintro><!--TTVTT--><dt><var title="">cue</var> = new <code title=dom-TextTrackCue><a href=#dom-texttrackcue>TextTrackCue</a></code>( <var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> [, <var title="">settings</var> [, <var title="">pauseOnExit</var> ] ] )</dt>
<dd>
Expand Down Expand Up @@ -61726,7 +61724,7 @@ <h4 id=browsing-context-names><span class=secno>6.1.6 </span>Browsing context na
<h3 id=the-window-object><span class=secno>6.2 </span>The <code><a href=#window>Window</a></code> object</h3>

<pre class=idl>[ReplaceableNamedProperties] <!-- XXX http://www.w3.org/Bugs/Public/show_bug.cgi?id=8241 -->
interface <dfn id=window>Window</dfn> {
interface <dfn id=window>Window</dfn> : <a href=#eventtarget>EventTarget</a> {
// the current browsing context
readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-window title=dom-window>window</a>;
readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-self title=dom-self>self</a>;
Expand Down Expand Up @@ -61847,8 +61845,7 @@ <h3 id=the-window-object><span class=secno>6.2 </span>The <code><a href=#window>
attribute <a href=#function>Function</a>? <a href=#handler-window-onunload title=handler-window-onunload>onunload</a>;
attribute <a href=#function>Function</a>? <a href=#handler-onvolumechange title=handler-onvolumechange>onvolumechange</a>;
attribute <a href=#function>Function</a>? <a href=#handler-onwaiting title=handler-onwaiting>onwaiting</a>;
};
<a href=#window>Window</a> implements <a href=#eventtarget>EventTarget</a>;</pre>
};</pre>

<!-- for more features to add here, look here:
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp
Expand Down Expand Up @@ -67203,7 +67200,7 @@ <h4 id=disk-space><span class=secno>6.6.8 </span>Disk space</h4>

<h4 id=application-cache-api><span class=secno>6.6.9 </span>Application cache API</h4>

<pre class=idl>interface <dfn id=applicationcache>ApplicationCache</dfn> {
<pre class=idl>interface <dfn id=applicationcache>ApplicationCache</dfn> : <a href=#eventtarget>EventTarget</a> {

// <a href=#concept-appcache-status title=concept-appcache-status>update status</a>
const unsigned short <a href=#dom-appcache-uncached title=dom-appcache-UNCACHED>UNCACHED</a> = 0;
Expand All @@ -67228,8 +67225,7 @@ <h4 id=application-cache-api><span class=secno>6.6.9 </span>Application cache AP
attribute <a href=#function>Function</a>? <a href=#handler-appcache-onupdateready title=handler-appcache-onupdateready>onupdateready</a>;
attribute <a href=#function>Function</a>? <a href=#handler-appcache-oncached title=handler-appcache-oncached>oncached</a>;
attribute <a href=#function>Function</a>? <a href=#handler-appcache-onobsolete title=handler-appcache-onobsolete>onobsolete</a>;
};
<a href=#applicationcache>ApplicationCache</a> implements <a href=#eventtarget>EventTarget</a>;</pre>
};</pre>

<dl class=domintro><dt><var title="">cache</var> = <var title="">window</var> . <code title=dom-applicationCache><a href=#dom-applicationcache>applicationCache</a></code></dt>
<dd>
Expand Down Expand Up @@ -75589,7 +75585,7 @@ <h4 id=interface-definitions><span class=secno>9.3.2 </span>Interface definition
object would then be readable using the File API -->

<pre class=idl>[<a href=#dom-mediastream title=dom-MediaStream>Constructor</a>(in <a href=#mediastream>MediaStream</a> parentStream)]
interface <dfn id=mediastream>MediaStream</dfn> {
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>;

Expand All @@ -75601,7 +75597,6 @@ <h4 id=interface-definitions><span class=secno>9.3.2 </span>Interface definition
readonly attribute unsigned short <a href=#dom-mediastream-readystate title=dom-MediaStream-readyState>readyState</a>;
attribute <a href=#function>Function</a>? <a href=#handler-mediastream-onended title=handler-MediaStream-onended>onended</a>;
};
<a href=#mediastream>MediaStream</a> implements <a href=#eventtarget>EventTarget</a>;

interface <dfn id=localmediastream>LocalMediaStream</dfn> : <a href=#mediastream>MediaStream</a> {
void <a href=#dom-mediastream-stop title=dom-MediaStream-stop>stop</a>();
Expand Down Expand Up @@ -76208,7 +76203,7 @@ <h4 id=introduction-12><span class=secno>9.4.1 </span>Introduction</h4>
<h4 id=interface-definitions-0><span class=secno>9.4.2 </span>Interface definitions</h4>

<pre class=idl>[<a href=#dom-peerconnection title=dom-PeerConnection>Constructor</a>(in DOMString configuration, in <a href=#signalingcallback>SignalingCallback</a> signalingCallback)]
interface <dfn id=peerconnection>PeerConnection</dfn> {
interface <dfn id=peerconnection>PeerConnection</dfn> : <a href=#eventtarget>EventTarget</a> {
void <a href=#dom-peerconnection-processsignalingmessage title=dom-PeerConnection-processSignalingMessage>processSignalingMessage</a>(in DOMString message);

const unsigned short <a href=#dom-peerconnection-new title=dom-PeerConnection-NEW>NEW</a> = 0;
Expand All @@ -76234,7 +76229,6 @@ <h4 id=interface-definitions-0><span class=secno>9.4.2 </span>Interface definiti
attribute <a href=#function>Function</a>? <a href=#handler-peerconnection-onaddstream title=handler-PeerConnection-onaddstream>onaddstream</a>;
attribute <a href=#function>Function</a>? <a href=#handler-peerconnection-onremovestream title=handler-PeerConnection-onremovestream>onremovestream</a>;
};
<a href=#peerconnection>PeerConnection</a> implements <a href=#eventtarget>EventTarget</a>;

[Callback=FunctionOnly, NoInterfaceObject]
interface <dfn id=signalingcallback>SignalingCallback</dfn> {
Expand Down Expand Up @@ -78324,7 +78318,7 @@ <h4 id=the-global-scope><span class=secno>10.2.1 </span>The global scope</h4>

<h5 id=the-workerglobalscope-abstract-interface><span class=secno>10.2.1.1 </span>The <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> abstract interface</h5>

<pre class=idl>interface <dfn id=workerglobalscope>WorkerGlobalScope</dfn> {
<pre class=idl>interface <dfn id=workerglobalscope>WorkerGlobalScope</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute <a href=#workerglobalscope>WorkerGlobalScope</a> <a href=#dom-workerglobalscope-self title=dom-WorkerGlobalScope-self>self</a>;
readonly attribute <a href=#workerlocation>WorkerLocation</a> <a href=#dom-workerglobalscope-location title=dom-WorkerGlobalScope-location>location</a>;

Expand All @@ -78334,8 +78328,7 @@ <h5 id=the-workerglobalscope-abstract-interface><span class=secno>10.2.1.1 </spa
attribute <a href=#function>Function</a>? <a href=#handler-workerglobalscope-onoffline title=handler-WorkerGlobalScope-onoffline>onoffline</a>;
attribute <a href=#function>Function</a>? <a href=#handler-workerglobalscope-ononline title=handler-WorkerGlobalScope-ononline>ononline</a>;
};
<a href=#workerglobalscope>WorkerGlobalScope</a> implements <a href=#workerutils>WorkerUtils</a>;
<a href=#workerglobalscope>WorkerGlobalScope</a> implements <a href=#eventtarget>EventTarget</a>;</pre>
<a href=#workerglobalscope>WorkerGlobalScope</a> implements <a href=#workerutils>WorkerUtils</a>;</pre>

<p>The <dfn id=dom-workerglobalscope-self title=dom-WorkerGlobalScope-self><code>self</code></dfn> attribute
must return the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object itself.</p>
Expand Down Expand Up @@ -78914,11 +78907,10 @@ <h4 id=creating-workers><span class=secno>10.2.7 </span>Creating workers</h4>
<h5 id=the-abstractworker-abstract-interface><span class=secno>10.2.7.1 </span>The <code><a href=#abstractworker>AbstractWorker</a></code> abstract interface</h5>

<pre class=idl>[Supplemental, NoInterfaceObject]
interface <dfn id=abstractworker>AbstractWorker</dfn> {
interface <dfn id=abstractworker>AbstractWorker</dfn> : <a href=#eventtarget>EventTarget</a> {
attribute <a href=#function>Function</a>? <a href=#handler-abstractworker-onerror title=handler-AbstractWorker-onerror>onerror</a>;
<!-- v2-onclose attribute <span>Function</span>? <span title="handler-AbstractWorker-onclose">onclose</span>; -->
};
<a href=#abstractworker>AbstractWorker</a> implements <a href=#eventtarget>EventTarget</a>;</pre>
};</pre>

<p>The following are the <a href=#event-handlers>event handlers</a> (and their
corresponding <a href=#event-handler-event-type title="event handler event type">event handler
Expand Down Expand Up @@ -79668,7 +79660,7 @@ <h4 id=server-sent-events-intro><span class=secno>11.2.1 </span>Introduction</h4
<h4 id=the-eventsource-interface><span class=secno>11.2.2 </span>The <code><a href=#eventsource>EventSource</a></code> interface</h4>

<pre class=idl>[<a href=#dom-eventsource title=dom-EventSource>Constructor</a>(in DOMString url)]
interface <dfn id=eventsource>EventSource</dfn> {
interface <dfn id=eventsource>EventSource</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute DOMString <a href=#dom-eventsource-url title=dom-EventSource-url>url</a>;

// ready state
Expand All @@ -79682,8 +79674,7 @@ <h4 id=the-eventsource-interface><span class=secno>11.2.2 </span>The <code><a hr
attribute <a href=#function>Function</a>? <a href=#handler-eventsource-onmessage title=handler-EventSource-onmessage>onmessage</a>;
attribute <a href=#function>Function</a>? <a href=#handler-eventsource-onerror title=handler-EventSource-onerror>onerror</a>;
void <a href=#dom-eventsource-close title=dom-EventSource-close>close</a>();
};
<a href=#eventsource>EventSource</a> implements <a href=#eventtarget>EventTarget</a>;</pre>
};</pre>

<p>The <dfn id=dom-eventsource title=dom-EventSource><code>EventSource(<var title="">url</var>)</code></dfn> constructor takes one argument,
<var title="">url</var>, which specifies the <a href=#url>URL</a> to
Expand Down Expand Up @@ -80465,7 +80456,7 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href

<pre class=idl>[<a href=#dom-websocket title=dom-WebSocket>Constructor</a>(in DOMString url, in optional DOMString protocols),
<a href=#dom-websocket title=dom-WebSocket>Constructor</a>(in DOMString url, in optional DOMString[] protocols)]
interface <dfn id=websocket>WebSocket</dfn> {
interface <dfn id=websocket>WebSocket</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute DOMString <a href=#dom-websocket-url title=dom-WebSocket-url>url</a>;

// ready state
Expand All @@ -80490,8 +80481,7 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(in DOMString data);
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(in <span>ArrayBuffer</span> data);
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(in <a href=#blob>Blob</a> data);
};
<a href=#websocket>WebSocket</a> implements <a href=#eventtarget>EventTarget</a>;</pre>
};</pre>

<p>The <dfn id=dom-websocket title=dom-WebSocket><code>WebSocket(<var title="">url</var>, <var title="">protocols</var>)</code></dfn>
constructor takes one or two arguments. The first argument, <var title="">url</var>, specifies the <a href=#url>URL</a> to which to
Expand Down Expand Up @@ -81472,7 +81462,7 @@ <h4 id=message-ports><span class=secno>11.5.3 </span>Message ports</h4>
<p>Each channel has two message ports. Data sent through one port is
received by the other port, and vice versa.</p>

<pre class=idl>interface <dfn id=messageport>MessagePort</dfn> {
<pre class=idl>interface <dfn id=messageport>MessagePort</dfn> : <a href=#eventtarget>EventTarget</a> {
<!-- v2-onclose readonly attribute boolean <span title="dom-MessagePort-active">active</span>;
--> void <a href=#dom-messageport-postmessage title=dom-MessagePort-postMessage>postMessage</a>(in any message, in optional sequence&lt;<a href=#transferable>Transferable</a>&gt; transfer);<!--
<span>MessagePort</span> <span title="dom-MessagePort-startConversation">startConversation</span>(in any message);-->
Expand All @@ -81482,7 +81472,6 @@ <h4 id=message-ports><span class=secno>11.5.3 </span>Message ports</h4>
// event handlers
attribute <a href=#function>Function</a>? <a href=#handler-messageport-onmessage title=handler-MessagePort-onmessage>onmessage</a>;
};
<a href=#messageport>MessagePort</a> implements <a href=#eventtarget>EventTarget</a>;
<a href=#messageport>MessagePort</a> implements <a href=#transferable>Transferable</a>;</pre>

<dl class=domintro><!-- v2-onclose
Expand Down
Loading

0 comments on commit 41451cc

Please sign in to comment.