Skip to content

Commit

Permalink
[giow] (1) Change how the global scope objects are exposed in workers…
Browse files Browse the repository at this point in the history
… so that dedicated workers and shared workers have global scopes with different interface names, since they are different interfaces. This patch also fixes some TOPIC lines for the intro of the spec.

Affected topics: DOM APIs, HTML, Video Text Tracks, Web Workers, WebSocket API

git-svn-id: http://svn.whatwg.org/webapps@6846 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 6, 2011
1 parent b0b3270 commit 276a77b
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 71 deletions.
68 changes: 43 additions & 25 deletions complete.html
Expand Up @@ -1004,7 +1004,7 @@ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 6 December 2011</
<ol>
<li><a href=#the-global-scope><span class=secno>9.2.1 </span>The global scope</a>
<ol>
<li><a href=#the-workerglobalscope-abstract-interface><span class=secno>9.2.1.1 </span>The <code>WorkerGlobalScope</code> abstract interface</a></li>
<li><a href=#the-workerglobalscope-common-interface><span class=secno>9.2.1.1 </span>The <code>WorkerGlobalScope</code> common interface</a></li>
<li><a href=#dedicated-workers-and-the-dedicatedworkerglobalscope-interface><span class=secno>9.2.1.2 </span>Dedicated workers and the <code>DedicatedWorkerGlobalScope</code> interface</a></li>
<li><a href=#shared-workers-and-the-sharedworkerglobalscope-interface><span class=secno>9.2.1.3 </span>Shared workers and the <code>SharedWorkerGlobalScope</code> interface</a></ol></li>
<li><a href=#origins-of-workers><span class=secno>9.2.2 </span>Origins of workers</a></li>
Expand Down Expand Up @@ -3764,6 +3764,7 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>

</dd>

<!--TOPIC:DOM APIs-->
<dt>DOM</dt>

<dd>
Expand Down Expand Up @@ -3935,11 +3936,13 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
required for conforming IDL fragments, as described in the Web IDL
specification. <a href=#refsWEBIDL>[WEBIDL]</a></p>

<p>The terms <dfn id=supported-property-indices>supported property indices</dfn>, <dfn id=supported-property-names>supported
property names</dfn>, <dfn id=determine-the-value-of-an-indexed-property>determine the value of an indexed
property</dfn>, <dfn id=determine-the-value-of-a-named-property>determine the value of a named
property</dfn>, <dfn id=platform-array-objects>platform array objects</dfn>, and <dfn id=dfn-read-only-array title=dfn-read-only-array>read only</dfn> (when applied to
arrays) are used as defined in the WebIDL specification.</p>
<p>The terms <dfn id=relevant-namespace-object>relevant namespace object</dfn>, <dfn id=supported-property-indices>supported
property indices</dfn>, <dfn id=supported-property-names>supported property names</dfn>,
<dfn id=determine-the-value-of-an-indexed-property>determine the value of an indexed property</dfn>,
<dfn id=determine-the-value-of-a-named-property>determine the value of a named property</dfn>, <dfn id=platform-array-objects>platform
array objects</dfn>, and <dfn id=dfn-read-only-array title=dfn-read-only-array>read
only</dfn> (when applied to arrays) are used as defined in the
WebIDL specification.</p>

<p id=float-nan>Except where otherwise specified, if an IDL
attribute that is a floating point number type (<code title="">double</code>) is assigned an Infinity or Not-a-Number
Expand Down Expand Up @@ -3983,6 +3986,8 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>

</dd>

<!--TOPIC:HTML-->

<dt>Media Queries</dt>

<dd>
Expand All @@ -3991,6 +3996,8 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>

</dd>

<!--TOPIC:Video Text Tracks-->

<dt>WebVTT</dt>

<dd>
Expand All @@ -4014,6 +4021,8 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<li>The <dfn id=webvtt-cue-text-parsing-rules>WebVTT cue text parsing rules</dfn>
</ul></dd>

<!--TOPIC:HTML-->

<dt>URIs, IRIs, IDNA</dt>

<dd>
Expand Down Expand Up @@ -4101,12 +4110,13 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
</ul></dd>


<!--TOPIC:WebSocket API-->

<dt>The WebSocket protocol</dt>

<dd>

<div data-component="WebSocket API (editor: Ian Hickson)"><!--websocket-api--><!--TOPIC:WebSocket API-->
<div data-component="WebSocket API (editor: Ian Hickson)"><!--websocket-api-->

<p>The following terms are defined in the WebSocket protocol
specification: <a href=#refsWSP>[WSP]</a></p>
Expand All @@ -4127,10 +4137,11 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<li><dfn id=the-websocket-connection-close-code>the WebSocket connection close code</dfn>
<li><dfn id=the-websocket-connection-close-reason>the WebSocket connection close reason</dfn>

</ul></div><!--data-component--><!--TOPIC:HTML-->
</ul></div><!--data-component-->

</dd>

<!--TOPIC:HTML-->


</dl><p>This specification does not <em>require</em> support of any
Expand Down Expand Up @@ -61144,6 +61155,10 @@ <h3 id=the-window-object><span class=secno>6.2 </span>The <code><a href=#window>

</dl><div class=impl>

<p>The <code><a href=#window>Window</a></code> interface must not exist if the
interface's <a href=#relevant-namespace-object>relevant namespace object</a> is not a
<code><a href=#window>Window</a></code> object. <a href=#refsWEBIDL>[WEBIDL]</a></p>

<p>The <dfn id=dom-window title=dom-window><code>window</code></dfn>, <dfn id=dom-frames title=dom-frames><code>frames</code></dfn>, and <dfn id=dom-self title=dom-self><code>self</code></dfn> IDL attributes must all
return the <code><a href=#window>Window</a></code> object's <a href=#browsing-context>browsing
context</a>'s <code><a href=#windowproxy>WindowProxy</a></code> object.</p>
Expand Down Expand Up @@ -74872,9 +74887,10 @@ <h4 id=the-global-scope><span class=secno>9.2.1 </span>The global scope</h4>

<p>The global scope is the "inside" of a worker.</p>

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

<pre class=idl>interface <dfn id=workerglobalscope>WorkerGlobalScope</dfn> : <a href=#eventtarget>EventTarget</a> {
<pre class=idl>[NoInterfaceObject]
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 Down Expand Up @@ -74923,20 +74939,18 @@ <h5 id=the-workerglobalscope-abstract-interface><span class=secno>9.2.1.1 </span
<tbody><!-- v2-onclose <tr><td><dfn title="handler-WorkerGlobalScope-onclose"><code>onclose</code></dfn> <td> <code title="event-close">close</code> --><tr><td><dfn id=handler-workerglobalscope-onerror title=handler-WorkerGlobalScope-onerror><code>onerror</code></dfn> <td> <code title=event-error>error</code>
<tr><td><dfn id=handler-workerglobalscope-onoffline title=handler-WorkerGlobalScope-onoffline><code>onoffline</code></dfn> <td> <code title=event-offline><a href=#event-offline>offline</a></code> <!-- new -->
<tr><td><dfn id=handler-workerglobalscope-ononline title=handler-WorkerGlobalScope-ononline><code>ononline</code></dfn> <td> <code title=event-online><a href=#event-online>online</a></code> <!-- new -->
</table><hr><p>The <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> interface must not exist if
the interface's <span>relevant namespace object</span> is a
<code><a href=#window>Window</a></code> object. <a href=#refsWEBIDL>[WEBIDL]</a></p>
</table><h5 id=dedicated-workers-and-the-dedicatedworkerglobalscope-interface><span class=secno>9.2.1.2 </span>Dedicated workers and the <code><a href=#dedicatedworkerglobalscope>DedicatedWorkerGlobalScope</a></code> interface</h5>



<h5 id=dedicated-workers-and-the-dedicatedworkerglobalscope-interface><span class=secno>9.2.1.2 </span>Dedicated workers and the <code><a href=#dedicatedworkerglobalscope>DedicatedWorkerGlobalScope</a></code> interface</h5>

<pre class=idl>[Supplemental, NoInterfaceObject]
interface <dfn id=dedicatedworkerglobalscope>DedicatedWorkerGlobalScope</dfn> : <a href=#workerglobalscope>WorkerGlobalScope</a> {
<pre class=idl>interface <dfn id=dedicatedworkerglobalscope>DedicatedWorkerGlobalScope</dfn> {
void <a href=#dom-dedicatedworkerglobalscope-postmessage title=dom-DedicatedWorkerGlobalScope-postMessage>postMessage</a>(any message, optional sequence&lt;<a href=#transferable>Transferable</a>&gt; transfer);<!--
<span>MessagePort</span> <span title="dom-DedicatedWorkerGlobalScope-startConversation">startConversation</span>(any message);-->
[TreatNonCallableAsNull] attribute <a href=#function>Function</a>? <a href=#handler-dedicatedworkerglobalscope-onmessage title=handler-DedicatedWorkerGlobalScope-onmessage>onmessage</a>;
};</pre>
};
<a href=#dedicatedworkerglobalscope>DedicatedWorkerGlobalScope</a> implements <a href=#workerglobalscope>WorkerGlobalScope</a>;</pre>

<p>The <code><a href=#dedicatedworkerglobalscope>DedicatedWorkerGlobalScope</a></code> interface must not
exist if the interface's <a href=#relevant-namespace-object>relevant namespace object</a> is
not a <code><a href=#dedicatedworkerglobalscope>DedicatedWorkerGlobalScope</a></code> object. <a href=#refsWEBIDL>[WEBIDL]</a></p>

<p><code><a href=#dedicatedworkerglobalscope>DedicatedWorkerGlobalScope</a></code> objects act as if they
had an implicit <code><a href=#messageport>MessagePort</a></code> associated with them. This
Expand Down Expand Up @@ -74972,12 +74986,16 @@ <h5 id=dedicated-workers-and-the-dedicatedworkerglobalscope-interface><span clas

<h5 id=shared-workers-and-the-sharedworkerglobalscope-interface><span class=secno>9.2.1.3 </span>Shared workers and the <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> interface</h5>

<pre class=idl>[Supplemental, NoInterfaceObject]
interface <dfn id=sharedworkerglobalscope>SharedWorkerGlobalScope</dfn> : <a href=#workerglobalscope>WorkerGlobalScope</a> {
<pre class=idl>interface <dfn id=sharedworkerglobalscope>SharedWorkerGlobalScope</dfn> : <a href=#workerglobalscope>WorkerGlobalScope</a> {
readonly attribute DOMString <a href=#dom-sharedworkerglobalscope-name title=dom-SharedWorkerGlobalScope-name>name</a>;
readonly attribute <a href=#applicationcache>ApplicationCache</a> <a href=#dom-sharedworkerglobalscope-applicationcache title=dom-SharedWorkerGlobalScope-applicationCache>applicationCache</a>;
[TreatNonCallableAsNull] attribute <a href=#function>Function</a>? <a href=#handler-sharedworkerglobalscope-onconnect title=handler-SharedWorkerGlobalScope-onconnect>onconnect</a>;
};</pre>
};
<a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a> implements <a href=#workerglobalscope>WorkerGlobalScope</a>;</pre>

<p>The <code><a href=#dedicatedworkerglobalscope>DedicatedWorkerGlobalScope</a></code> interface must not
exist if the interface's <a href=#relevant-namespace-object>relevant namespace object</a> is
not a <code><a href=#dedicatedworkerglobalscope>DedicatedWorkerGlobalScope</a></code> object. <a href=#refsWEBIDL>[WEBIDL]</a></p>

<p>Shared workers receive message ports through <code title=event-WorkerGlobalScope-connect>connect</code> events on
their global object for each connection.</p>
Expand Down Expand Up @@ -75992,7 +76010,7 @@ <h4 id=importing-scripts-and-libraries><span class=secno>9.3.1 </span>Importing
</p>

<p>This <code><a href=#workernavigator>WorkerNavigator</a></code> interface must not exist if the
interface's <span>relevant namespace object</span> is a
interface's <a href=#relevant-namespace-object>relevant namespace object</a> is a
<code><a href=#window>Window</a></code> object. <a href=#refsWEBIDL>[WEBIDL]</a></p>


Expand Down Expand Up @@ -76068,7 +76086,7 @@ <h4 id=worker-locations><span class=secno>9.3.4 </span>Worker locations</h4>
</p>

<p>The <code><a href=#workerlocation>WorkerLocation</a></code> interface must not exist if the
interface's <span>relevant namespace object</span> is a
interface's <a href=#relevant-namespace-object>relevant namespace object</a> is a
<code><a href=#window>Window</a></code> object. <a href=#refsWEBIDL>[WEBIDL]</a></p>


Expand Down

0 comments on commit 276a77b

Please sign in to comment.