workers/Overview.html 1.74 81 Reporting script errors. (credit: js) (wh

Reporting script errors. (credit: js) (whatwg r81)

fileno
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#fileno
2.1.2 Dedicated workers and the DedicatedWorkerGlobalScope interface
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#dedicated
initErrorEventNS()
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#initerroreventns
fire an error event
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#fire-an
onerror
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#onerror
WorkerGlobalScope
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#workerglobalscope
onclose
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#onclose
terminate a worker
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#terminate
Editor's Draft 23 December 2008
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#editors
filename
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#filename
2.6.1 The AbstractWorker abstract interface
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#the-abstractworker
onerror
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#onerror0
AbstractWorker
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#abstractworker
message
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#message
2.5.1 Runtime script errors
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#runtime
ErrorEvent
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#errorevent
initErrorEvent()
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#initerrorevent
2.6 Creating workers
http://people.w3.org/mike/diffs/html5/workers/Overview.1.74.html#creating

http://people.w3.org/mike/diffs/html5/workers/Overview.diff.html
http://dev.w3.org/cvsweb/html5/workers/Overview.html?r1=1.73&r2=1.74&f=h
http://html5.org/tools/web-apps-tracker?from=80&to=81

===================================================================
RCS file: /sources/public/html5/workers/Overview.html,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- Overview.html 16 Dec 2008 20:15:43 -0000 1.73
+++ Overview.html 23 Dec 2008 21:07:20 -0000 1.74
@@ -16,7 +16,7 @@
    <h1>Web Workers</h1>
 
    <h2 class="no-num no-toc" id=editors><!-- "W3C Working Draft" --> Editor's
-    Draft <!--ZZZ-->16 December 2008</h2>
+    Draft <!--ZZZ-->23 December 2008</h2>
 
    <dl><!-- ZZZ: update the month/day
     <dt>This Version:</dt>
@@ -142,7 +142,7 @@
   <p>The W3C <a href="http://www.w3.org/2008/webapps/">Web Apps Working
    Group</a> is the W3C working group responsible for this specification's
    progress along the W3C Recommendation track. <!--ZZZ:--> This
-   specification is the 16 December 2008 <!--ZZZ "Working Draft"-->Editor's
+   specification is the 23 December 2008 <!--ZZZ "Working Draft"-->Editor's
    Draft. <!--:ZZZ--></p>
   <!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST -->
   <!-- relationship to other work (required) -->
@@ -240,6 +240,10 @@
 
      <li><a href="#processing"><span class=secno>2.5 </span>Processing
       model</a>
+      <ul class=toc>
+       <li><a href="#runtime"><span class=secno>2.5.1 </span>Runtime script
+        errors</a>
+      </ul>
 
      <li><a href="#creating"><span class=secno>2.6 </span>Creating
       workers</a>
@@ -1235,6 +1239,7 @@
 
   void <a href="#close" title=dom-WorkerGlobalScope-close>close</a>();
            attribute <span>EventListener</span> <a href="#onclose" title=handler-WorkerGlobalScope-onclose>onclose</a>;
+           attribute <span>EventListener</span> <a href="#onerror" title=handler-WorkerGlobalScope-onerror>onerror</a>;
 };</pre>
 
   <p>Objects implementing the <code><a
@@ -1293,6 +1298,16 @@
     <p>Must be invoked whenever a <code title=event-close>close</code> event
      is targeted at or bubbles through the <code><a
      href="#workerglobalscope">WorkerGlobalScope</a></code> object.
+
+   <dt><dfn id=onerror
+    title=handler-WorkerGlobalScope-onerror><code>onerror</code></dfn>
+
+   <dd>
+    <p>Must be invoked whenever an <code title=event-error>error</code> event
+     is targeted at or bubbles through the element.</p>
+
+    <p>The initial value of <code title=handler-WorkerGlobalScope-onerror><a
+     href="#onerror">onerror</a></code> must be <code>undefined</code>.
   </dl>
 
   <h4 id=dedicated><span class=secno>2.1.2 </span>Dedicated workers and the
@@ -1747,6 +1762,70 @@
      port is entangled with.
   </ol>
 
+  <h4 id=runtime><span class=secno>2.5.1 </span>Runtime script errors</h4>
+
+  <p>Whenever a runtime script error occurs in one of the worker's scripts,
+   the user agent must <span>report the error</span> using the <code
+   title=handler-WorkerGlobalScope-onerror><a
+   href="#onerror">onerror</a></code> <span title="event handler DOM
+   attributes">event handler DOM attribute</span> of the <code><a
+   href="#workerglobalscope">WorkerGlobalScope</a></code> object.
+
+  <p>For shared workers, if the error is still <i title="">not handled</i>
+   afterwards, the error should be reported to the user.
+
+  <p>For dedicated workers, if the error is still <i title="">not handled</i>
+   afterwards, <span>queue a task</span> to <a href="#fire-an">fire an error
+   event</a> at the <code><a href="#worker1">Worker</a></code> object
+   associated with the worker.
+
+  <p>When the user agent is to <dfn id=fire-an>fire an error event</dfn> at a
+   <code><a href="#worker1">Worker</a></code> object, it must dispatch an
+   event that uses the <code><a href="#errorevent">ErrorEvent</a></code>
+   interface, with the name <code title=event-error>error</code>, that
+   doesn't bubble and is cancelable, with its <code
+   title=dom-ErrorEvent-message><a href="#message">message</a></code>, <code
+   title=dom-ErrorEvent-filename><a href="#filename">filename</a></code>, and
+   <code title=dom-ErrorEvent-lineno>lineno</code> attributes set
+   appropriately. The default action of this event depends on whether the
+   <code><a href="#worker1">Worker</a></code> object is itself in a worker.
+   If it is, and that worker is also a dedicated worker, then the user agent
+   must again span>queue a task to <a href="#fire-an">fire an error event</a>
+   at the <code><a href="#worker1">Worker</a></code> object associated with
+   <em>that</em> worker. Otherwise, then the error should be reported to the
+   user.
+
+  <hr>
+
+  <pre class=idl>interface <dfn id=errorevent>ErrorEvent</dfn> : Event {
+  readonly attribute DOMObject <a href="#message" title=dom-ErrorEvent-message>message</a>;
+  readonly attribute DOMObject <a href="#filename" title=dom-ErrorEvent-filename>filename</a>;
+  readonly attribute unsigned long <a href="#fileno" title=dom-ErrorEvent-fileno>fileno</a>;
+  void <a href="#initerrorevent" title=dom-ErrorEvent-initErrorEvent>initErrorEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMObject messageArg, in DOMObject filenameArg, in unsigned long filenoArg);
+  void <a href="#initerroreventns" title=dom-ErrorEvent-initErrorEventNS>initErrorEventNS</a>(in DOMString namespaceURIArg, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMObject messageArg, in DOMObject filenameArg, in unsigned long filenoArg);
+};</pre>
+
+  <p>The <dfn id=initerrorevent
+   title=dom-ErrorEvent-initErrorEvent><code>initErrorEvent()</code></dfn>
+   and <dfn id=initerroreventns
+   title=dom-ErrorEvent-initErrorEventNS><code>initErrorEventNS()</code></dfn>
+   methods must initialize the event in a manner analogous to the
+   similarly-named methods in the DOM3 Events interfaces. <a
+   href="#refsDOM3EVENTS">[DOM3EVENTS]</a>
+
+  <p>The <dfn id=message
+   title=dom-ErrorEvent-message><code>message</code></dfn> attribute
+   represents the error message.
+
+  <p>The <dfn id=filename
+   title=dom-ErrorEvent-filename><code>filename</code></dfn> attribute
+   represents the <span>absolute URL</span> of the script in which the error
+   originally occured.
+
+  <p>The <dfn id=fileno title=dom-ErrorEvent-fileno><code>fileno</code></dfn>
+   attribute represents the line number where the error occured in the
+   script.
+
   <h3 id=creating><span class=secno>2.6 </span>Creating workers</h3>
 
   <h4 id=the-abstractworker><span class=secno>2.6.1 </span>The <code><a
@@ -1754,7 +1833,7 @@
 
   <pre
    class=idl>[NoInterfaceObject] interface <dfn id=abstractworker>AbstractWorker</dfn> {
-           attribute <span>EventListener</span> <a href="#onerror" title=handler-AbstractWorker-onerror>onerror</a>;
+           attribute <span>EventListener</span> <a href="#onerror0" title=handler-AbstractWorker-onerror>onerror</a>;
            attribute <span>EventListener</span> <a href="#onclose0" title=handler-AbstractWorker-onclose>onclose</a>;
 };</pre>
 
@@ -1767,7 +1846,7 @@
    href="#abstractworker">AbstractWorker</a></code> interface:
 
   <dl>
-   <dt><dfn id=onerror
+   <dt><dfn id=onerror0
     title=handler-AbstractWorker-onerror><code>onerror</code></dfn>
 
    <dd>

Received on Tuesday, 23 December 2008 21:08:33 UTC