[html5] r3673 - [gw] (2) Make SharedWorker's second argument optional.

whatwg at whatwg.org whatwg at whatwg.org
Tue Aug 25 16:25:13 PDT 2009


Author: ianh
Date: 2009-08-25 16:25:12 -0700 (Tue, 25 Aug 2009)
New Revision: 3673

Modified:
   source
Log:
[gw] (2) Make SharedWorker's second argument optional.

Modified: source
===================================================================
--- source	2009-08-25 21:58:59 UTC (rev 3672)
+++ source	2009-08-25 23:25:12 UTC (rev 3673)
@@ -69540,7 +69540,7 @@
 
   <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 @@
    <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 @@
       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 @@
        <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 @@
 
    <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>
 




More information about the Commit-Watchers mailing list