Skip to content

Commit

Permalink
[gw] (2) Make SharedWorker's second argument optional.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3673 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 25, 2009
1 parent e9d244a commit f5b922d
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions source
Expand Up @@ -69540,7 +69540,7 @@ interface <dfn>Worker</dfn> : <span>AbstractWorker</span> {

<h5>Shared workers and the <code>SharedWorker</code> interface</h5>

<pre class="idl">[<span title="dom-SharedWorker">Constructor</span>(in DOMString scriptURL, in DOMString name)]
<pre class="idl">[<span title="dom-SharedWorker">Constructor</span>(in DOMString scriptURL, optional in DOMString name)]
interface <dfn>SharedWorker</dfn> : <span>AbstractWorker</span> {
readonly attribute <span>MessagePort</span> <span title="dom-SharedWorker-port">port</span>;
};</pre>
Expand All @@ -69563,9 +69563,16 @@ interface <dfn>SharedWorker</dfn> : <span>AbstractWorker</span> {
<li><p>If this fails, throw a <code>SYNTAX_ERR</code>
exception.</p></li>

<li><p>If the <span>origin</span> of the resulting <span>absolute
URL</span> is not the <span title="same origin">same</span> as the
origin of the script that invoked the constructor, then throw a
<li><p>Otherwise, let <var title="">scriptURL</var> be the
resulting <span>absolute URL</span>.</p></li>

<li><p>Let <var title="">name</var> be the value of the second
argument, or the value of <var title="">scriptURL</var>, if the
second argument was omitted.</p></li>

<li><p>If the <span>origin</span> of <var title="">scriptURL</var>
is not the <span title="same origin">same</span> as the origin of
the script that invoked the constructor, then throw a
<span>security exception</span>.</p></li>

<li>
Expand Down Expand Up @@ -69604,12 +69611,11 @@ interface <dfn>SharedWorker</dfn> : <span>AbstractWorker</span> {
whose <span title="dom-WorkerGlobalScope-closing">closing</span>
flag is false, whose <code
title="dom-WorkerGlobalScope-name">name</code> attribute is
exactly equal to the <var title="">name</var> argument, and
whose <code
exactly equal to <var title="">name</var>, and whose <code
title="dom-WorkerGlobalScope-location">location</code> attribute
represents an <span>absolute URL</span> that has the <span>same
origin</span> as the resulting <span>absolute URL</span>, then
run these substeps:</p>
represents an <span>absolute URL</span> with the <span>same
origin</span> as <var title="">scriptURL</var>, then run these
substeps:</p>

<ol>

Expand All @@ -69619,9 +69625,9 @@ interface <dfn>SharedWorker</dfn> : <span>AbstractWorker</span> {
<li><p>If <var title="">worker global scope</var>'s <code
title="dom-WorkerGlobalScope-location">location</code>
attribute represents an <span>absolute URL</span> that is not
exactly equal to the resulting <span>absolute URL</span>, then
throw a <code>URL_MISMATCH_ERR</code> exception and abort all
these steps.</p></li>
exactly equal to <var title="">scriptURL</var>, then throw a
<code>URL_MISMATCH_ERR</code> exception and abort all these
steps.</p></li>

<li><p>Associate <var title="">worker</var> with <var
title="">worker global scope</var>.</p></li>
Expand Down Expand Up @@ -69737,9 +69743,9 @@ interface <dfn>SharedWorker</dfn> : <span>AbstractWorker</span> {

<li>

<p><span>Run a worker</span> for the resulting <span>absolute
URL</span>, with the <span>script browsing context</span> of the
script that invoked the method as the <var title="">owner browsing
<p><span>Run a worker</span> for <var title="">scriptURL</var>,
with the <span>script browsing context</span> of the script that
invoked the method as the <var title="">owner browsing
context</var>, and with <var title="">worker global scope</var> as
the global scope.</p>

Expand Down

0 comments on commit f5b922d

Please sign in to comment.