Skip to content
Permalink
Browse files
[gw] (2) Make SharedWorker's second argument optional.
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 f5b922d12c171f1f80be87a08657592a8c9661ad
Showing with 21 additions and 15 deletions.
  1. +21 −15 source
36 source
@@ -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>
@@ -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>
@@ -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>

@@ -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>
@@ -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>

0 comments on commit f5b922d

Please sign in to comment.