workers/Overview.html 1.14 17 Define import(url). (whatwg r17) (changed

Define import(url). (whatwg r17) (changed by: Ian Hickson)

Diffs for this change per section: 
  kill a worker
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.14.html#kill-a
  import(url)
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.14.html#import
  WindowWorker
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.14.html#windowworker
  3. APIs available to workers
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.14.html#apis-available
  close()
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.14.html#close

Current content per affected section: 
  http://dev.w3.org/html5/workers/Overview.html#kill-a
  http://dev.w3.org/html5/workers/Overview.html#import
  http://dev.w3.org/html5/workers/Overview.html#windowworker
  http://dev.w3.org/html5/workers/Overview.html#apis-available
  http://dev.w3.org/html5/workers/Overview.html#close

Previously published WD content per affected section: 
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#kill-a
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#import
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#windowworker
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#apis-available
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#close

Cumulative diff: http://people.w3.org/mike/diffs/html5/workers/Overview.diff.html

http://dev.w3.org/cvsweb/html5/workers/Overview.html?r1=1.13&r2=1.14&f=h

http://html5.org/tools/web-apps-tracker?from=16&to=17

===================================================================
RCS file: /sources/public/html5/workers/Overview.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Overview.html 18 Jul 2008 08:10:42 -0000 1.13
+++ Overview.html 18 Jul 2008 08:43:43 -0000 1.14
@@ -383,6 +383,7 @@
   readonly attribute DOMString <a href="#url" title=dom-WindowWorker-URL>URL</a>;
   readonly attribute DOMString <a href="#name" title=dom-WindowWorker-name>name</a>;
   readonly attribute boolean <a href="#closing" title=dom-WindowWorker-closing>closing</a>;
+  boolean <a href="#import" title=dom-WindowWorker-import>import</a>(in DOMString url);
   void <a href="#close" title=dom-WindowWorker-close>close</a>();
 
   // event handler attributes
@@ -639,6 +640,62 @@
 
   <hr>
 
+  <p>When a script invokes the <dfn id=import
+   title=dom-WindowWorker-import><code>import(<var
+   title="">url</var>)</code></dfn> method on a <code><a
+   href="#windowworker">WindowWorker</a></code> object, the user agent must
+   run the following steps:
+
+  <ol>
+   <li>
+    <p><span title="resolve a url">Resolve</span> the <var title="">url</var>
+     argument.
+
+   <li>
+    <p>If this fails, throw a <code>SYNTAX_ERR</code> exception.
+
+   <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 method, then throw a <span>security
+     exception</span>.
+
+   <li>
+    <p>Attempt to <span>fetch</span><!-- XXX --> the resource identified by
+     the resulting <span>absolute URL</span>.</p>
+
+    <p>If the attempt fails, return false and abort these steps.</p>
+
+    <p>If the attempt succeeds, then let <var title="">script</var> be the
+     resource that was obtained.</p>
+
+    <p class=note>As with the initial script, the script here is always
+     assumed to be JavaScript, regardless of the MIME type.</p>
+    <!-- XXX -->
+
+   <li>
+    <p>Let <var title="">script</var>'s <span>script execution
+     context</span>, <span>script browsing context</span>, and <span>script
+     document context</span> be the same as for the script that was executed
+     by the <a href="#run-a">run a worker</a> processing model for this
+     worker.</p>
+
+   <li>
+    <p>Run <var title="">script</var> until it either returns, fails to catch
+     an exception, or gets prematurely aborted by the "<a href="#kill-a">kill
+     a worker</a>" algorithm below.</p>
+
+    <p>If an exception was raised or if the script was prematurely aborted,
+     then abort these steps, letting the exception or aborting continue to be
+     processed by the script that called the <code
+     title=dom-WindowWorker-import><a href="#import">import()</a></code>
+     method.</p>
+
+    <p>Otherwise, return true.</p>
+  </ol>
+
+  <hr>
+
   <p>When a script invokes the <dfn id=close
    title=dom-WindowWorker-close><code>close()</code></dfn> method on a
    <code><a href="#windowworker">WindowWorker</a></code> object, the user
@@ -919,7 +976,6 @@
    <!-- XXX a way to set cookies on the URL for the script -->
    <!-- XXX the navigator object, for UA sniffing (?) -->
    <!-- XXX
-  void include(in DOMString url);
   void log(in DOMString s); // log to console
 -->
   </ul>

Received on Friday, 18 July 2008 08:45:11 UTC