[html5] r6819 - [giow] (2) Tighten up onerror's definition. Fixing http://www.w3.org/Bugs/Public [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Nov 10 15:45:03 PST 2011


Author: ianh
Date: 2011-11-10 15:45:02 -0800 (Thu, 10 Nov 2011)
New Revision: 6819

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Tighten up onerror's definition.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14176

Modified: complete.html
===================================================================
--- complete.html	2011-11-04 17:34:58 UTC (rev 6818)
+++ complete.html	2011-11-10 23:45:02 UTC (rev 6819)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 4 November 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 10 November 2011</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -16098,7 +16098,8 @@
 
         <p><a href=#create-a-script-from-a-node title="create a script from a node">Create a
         script</a> from the <code><a href=#the-script-element>script</a></code> element node, using
-        <var><a href="#the-script-block's-source">the script block's source</a></var> and <var><a href="#the-script-block's-type">the script
+        <var><a href="#the-script-block's-source">the script block's source</a></var>, the <a href=#url>URL</a>
+        from which the script was obtained, and <var><a href="#the-script-block's-type">the script
         block's type</a></var>.</p>
 
         <p class=note>This is where the script is compiled and
@@ -68008,10 +68009,10 @@
   <h5 id=creating-scripts><span class=secno>7.1.3.3 </span>Creating scripts</h5>
 
   <p>When the specification says that a <a href=#concept-script title=concept-script>script</a> is to be <dfn id=create-a-script title="create a
-  script">created</dfn>, given some script source, its scripting
-  language, a global object, a browsing context, a URL character
-  encoding, and a base URL, the user agent must run the following
-  steps:</p>
+  script">created</dfn>, given some script source, a script source
+  URL, its scripting language, a global object, a browsing context, a
+  URL character encoding, and a base URL, the user agent must run the
+  following steps:</p>
 
   <ol><li><p>If <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is
    disabled</a> for <a href=#browsing-context>browsing context</a> passed to this
@@ -68042,7 +68043,9 @@
     entry-point">Jump</a> to the <a href=#concept-script title=concept-script>script</a>'s <i><a href=#initial-code-entry-point>initial code
     entry-point</a></i>.</p>
 
-    <p>Otherwise, <a href=#report-the-error>report the error</a> using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
+    <p>Otherwise, <a href=#report-the-error>report the error</a> at the script source
+    URL, with the problematic line number, in the script's
+    <a href=#origin>origin</a>, using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
     handlers">event handler</a> of the <a href="#script's-global-object">script's global
     object</a>. If the error is still <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i> after this, then
     the error may be reported to the user.</p>
@@ -68050,19 +68053,20 @@
    </li>
 
   </ol><hr><p>When the user agent is to <dfn id=create-an-impotent-script>create an impotent script</dfn>,
-  given some script source, its scripting language, and a browsing
-  context, the user agent must <a href=#create-a-script>create a script</a>, using the
-  given script source and scripting language, using a new empty object
-  as the global object, and using the given browsing context as the
-  browsing context. The URL character encoding and base URL for the
-  resulting <a href=#concept-script title=concept-script>script</a> are not
-  important as no APIs are exposed to the script.</p>
+  given some script source and URL, its scripting language, and a
+  browsing context, the user agent must <a href=#create-a-script>create a script</a>,
+  using the given script source, URL, and scripting language, using a
+  new empty object as the global object, and using the given browsing
+  context as the browsing context. The URL character encoding and base
+  URL for the resulting <a href=#concept-script title=concept-script>script</a> are
+  not important as no APIs are exposed to the script.</p>
 
   <hr><p>When the specification says that a <a href=#concept-script title=concept-script>script</a> is to be <dfn id=create-a-script-from-a-node title="create a
-  script from a node">created from a node</dfn> <var title="">node</var>, given some script source and its scripting
-  language, the user agent must <a href=#create-a-script>create a script</a>, using
-  the given script source and scripting language, and using <a href=#the-script-settings-determined-from-the-node>the
-  script settings determined from the node</a> <var title="">node</var>.</p>
+  script from a node">created from a node</dfn> <var title="">node</var>, given some script source, its URL, and its
+  scripting language, the user agent must <a href=#create-a-script>create a
+  script</a>, using the given script source, URL, and scripting
+  language, and using <a href=#the-script-settings-determined-from-the-node>the script settings determined from the
+  node</a> <var title="">node</var>.</p>
 
   <p><dfn id=the-script-settings-determined-from-the-node>The script settings determined from the node</dfn> <var title="">node</var> are computed as follows:</p>
 
@@ -68125,35 +68129,42 @@
   <h5 id=runtime-script-errors><span class=secno>7.1.3.5 </span>Runtime script errors</h5>
 
   <p>When the user agent is required to <dfn id=report-the-error title="report the
-  error">report an error</dfn> <var title="">error</var> using the
-  <a href=#event-handlers title="event handlers">event handler</a> <var title="">onerror</var>, it must run these steps, after which the
-  error is either <dfn id=concept-error-handled title=concept-error-handled><i>handled</i></dfn> or <dfn id=concept-error-nothandled title=concept-error-nothandled><i>not handled</i></dfn>:</p>
+  error">report an error</dfn> at a particular <a href=#url>URL</a> <var title="">location</var> with a particular line number <var title="">line</var> in a particular origin <var title="">origin</var>, using the <a href=#event-handlers title="event handlers">event
+  handler</a> <var title="">onerror</var>, it must run these steps,
+  after which the error is either <dfn id=concept-error-handled title=concept-error-handled><i>handled</i></dfn> or <dfn id=concept-error-nothandled title=concept-error-nothandled><i>not handled</i></dfn>:</p>
 
   <dl class=switch><dt>If the value of <var title="">onerror</var> is a
    <code><a href=#function>Function</a></code></dt>
 
    <dd>
 
-    <p>The function must be invoked with three arguments. The first
-    two arguments passed to the function must be of type
-    <code>DOMString</code>, and the third must be of type
-    <code>unsigned long</code>. The first must give the message that
-    the UA is considering reporting, the second must give the
-    <a href=#absolute-url>absolute URL</a> of the resource in which the error
-    occurred, and the third must give the line number in that resource
-    on which the error occurred.</p>
+    <ol><li><p>Let <var title="">message</var> be a user-agent-defined
+     string describing the error in a helpful manner.</li>
 
-    <p>If the function returns false, then the error is <i title=concept-error-handled><a href=#concept-error-handled>handled</a></i>. Otherwise, the error is
-    <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
+     <li><p>If the <var title="">location</var> <a href=#url>URL</a> does
+     not have a <a href=#same-origin title="same origin">same</a>
+     <a href=#origin>origin</a> as the <var title="">origin</var>, then set
+     <var title="">message</var> to "<code title="">Script
+     error.</code>", set <var title="">location</var> to the empty
+     string, and set <var title="">line</var> to 0.</li>
 
-    <p>Any uncaught exceptions thrown or errors caused by this
-    function may be reported to the user immediately after the error
-    that the function was called for; the <a href=#report-the-error title="report the
-    error">report an error</a> algorithm must not be used to handle
-    exceptions thrown or errors caused by this function.</p>
+     <li>
 
-   </dd>
+      <p>The function must be invoked with three arguments: <var title="">message</var>, <var title="">location</var>, and <var title="">line</var>.</p>
 
+      <p>If the function returns false, then the error is <i title=concept-error-handled><a href=#concept-error-handled>handled</a></i>. Otherwise, the error is
+      <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
+
+      <p>Any uncaught exceptions thrown or errors caused by this
+      function may be reported to the user immediately after the error
+      that the function was called for; the <a href=#report-the-error title="report the
+      error">report an error</a> algorithm must not be used to handle
+      exceptions thrown or errors caused by this function.</p>
+
+     </li>
+
+    </ol></dd>
+
    <dt>Otherwise</dt>
 
    <dd>
@@ -68166,11 +68177,34 @@
 
   <p>Whenever an uncaught runtime script error occurs in one of the
   scripts associated with a <code><a href=#document>Document</a></code>, the user agent must
-  <a href=#report-the-error>report the error</a> using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
+  <a href=#report-the-error>report the error</a> at the URL of the resource containing
+  the script (as established when the <a href=#concept-script title=concept-script>script</a> was <a href=#create-a-script title="create a
+  script">created</a>), with the problematic line number in that
+  resource, in the script's <a href=#origin>origin</a>, using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
   handlers">event handler</a> of the <a href="#script's-global-object">script's global
   object</a>. If the error is still <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i> after this, then
   the error may be reported to the user.</p>
 
+  <p>The resource containing the script will typically be the file
+  from which the <code><a href=#document>Document</a></code> was parsed, e.g. for inline
+  <code><a href=#the-script-element>script</a></code> elements or <a href=#event-handler-content-attributes>event handler content
+  attributes</a>; or the JavaScript file that the script was in,
+  for external scripts. Even for dynamically-generated scripts, user
+  agents are strongly encouraged to attempt to keep track of the
+  original source of a script. For example, if an external script uses
+  the <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> API to
+  insert an inline <code><a href=#the-script-element>script</a></code> element during parsing, the URL
+  of the resource containing the script would ideally be reported as
+  being the external script, and the line number might ideally be
+  reported as the line with the <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> call or where the
+  string passed to that call was first constructed. Naturally,
+  implementing this can be somewhat non-trivial.</p>
+
+  <p>User agents are similarly encouraged to keep careful track of the
+  original line numbers, even in the face of <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> calls mutating
+  the document as it is parsed, or <a href=#event-handler-content-attributes>event handler content
+  attributes</a> spanning multiple lines.</p>
+
   </div>
 
 
@@ -68514,7 +68548,9 @@
       <p><a href=#create-a-script-from-a-node title="create a script from a node">Create a
       script</a> from the <code><a href=#document>Document</a></code> node of the
       <a href=#active-document>active document</a>, using the aforementioned script
-      source, and assuming the scripting language is JavaScript.</p>
+      source, the <a href=#url>URL</a> of the resource where the
+      <code>javascript:</code> URL, was found, and assuming the
+      scripting language is JavaScript.</p>
 
       <p>Let <var title="">result</var> be the return value of the
       <i><a href=#initial-code-entry-point>initial code entry-point</a></i> of this <a href=#concept-script title=concept-script>script</a>. If an exception was
@@ -68655,6 +68691,13 @@
   requirements, in particular the <code title=handler-MessagePort-onmessage><a href=#handler-messageport-onmessage>onmessage</a></code> attribute of
   <code><a href=#messageport>MessagePort</a></code> objects.</p>
 
+  <p>On getting, <a href=#event-handler-idl-attributes>event handler IDL attributes</a> must return
+  the value of their corresponding event handlers, except when the
+  value is an <a href=#concept-handler-error title=concept-handler-error>internal error
+  value</a>, in which case the user agent must set the corresponding
+  event handler to null, and then throw an exception corresponding to
+  the error condition.</p>
+
   <hr></div>
 
   <p><dfn id=event-handler-content-attributes>Event handler content attributes</dfn>, when specified, must
@@ -68687,7 +68730,8 @@
 
     <p>If <var title="">body</var> is not parsable as
     <i>FunctionBody</i> or if parsing detects an <i>early error</i>
-    then abort these steps.</p>
+    then <a href=#set-the-event-handler-content-attribute-to-an-error>set the event handler content attribute to an
+    error</a> as defined below, and abort these steps.</p>
 
     <p class=note><i>FunctionBody</i> is defined in ECMAScript
     edition 5 section 13 Function Definition. <i>Early error</i> is
@@ -68714,7 +68758,9 @@
 
     <p>If <var title="">strict</var> is true, and anything in <var
     title="">body</var> is a <code>SyntaxError</code> according to the
-    Strict Mode Restrictions, then abort these steps.</p>
+    Strict Mode Restrictions, then <span>set the event handler content
+    attribute to an error</span> as defined below, and abort these
+    steps.</p>
 
     <p class="note">The Strict Mode Restrictions are those listed in
     ECMAScript edition 5 section 13.1 Strict Mode Restrictions. <a
@@ -68786,8 +68832,18 @@
    <li><p>Set the corresponding <a href=#event-handlers title="event handlers">event
    handler</a> to the aforementioned function.</li>
 
-  </ol><p>When an event handler content attribute is removed, the user
+  </ol><p>When a user agent is required, by the steps above, to <dfn id=set-the-event-handler-content-attribute-to-an-error>set
+  the event handler content attribute to an error</dfn>, the user
   agent must set the corresponding <a href=#event-handlers title="event handlers">event
+  handler</a> to an <dfn id=concept-handler-error title=concept-handler-error>internal
+  error value</dfn> representing the error condition, keeping track of
+  the <a href=#url>URL</a> of the resource where the <a href=#event-handler-content-attributes title="event
+  handler content attributes">event handler content attribute</a>
+  was set, and the relevant line number inside that resource where the
+  error occurred.</p>
+
+  <p>When an event handler content attribute is removed, the user
+  agent must set the corresponding <a href=#event-handlers title="event handlers">event
   handler</a> to null.</p>
   <!--
   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/245 onload
@@ -68809,9 +68865,8 @@
 
   <hr><p>When an <a href=#event-handlers title="event handlers">event handler</a> <var title="">H</var> of an element or object <var title="">T</var>
   implementing the <code><a href=#eventtarget>EventTarget</a></code> interface is first set to
-  a non-null <code><a href=#function>Function</a></code> object, the user agent must append
-  an <a href=#concept-event-listener title=concept-event-listener>event listener</a> to the
-  list of <a href=#concept-event-listener title=concept-event-listener>event listeners</a>
+  a non-null value, the user agent must append an <a href=#concept-event-listener title=concept-event-listener>event listener</a> to the list of
+  <a href=#concept-event-listener title=concept-event-listener>event listeners</a>
   associated with <var title="">T</var> with <i>type</i> set to the
   <dfn id=event-handler-event-type>event handler event type</dfn> corresponding to <var title="">H</var>, <i>capture</i> set to false, and <i>listener</i>
   set to <a href=#the-event-handler-processing-algorithm>the event handler processing algorithm</a> defined
@@ -68867,6 +68922,16 @@
   <ol><li><p>If <var title="">H</var>'s value is null, then abort these
    steps.</li>
 
+   <li><p>If <var title="">H</var>'s value is an <a href=#concept-handler-error title=concept-handler-error>internal error value</a>, then set
+   the <a href=#event-handlers title="event handlers">event handler</a> to null and
+   then <a href=#report-the-error>report the error</a> at the appropriate URL and with
+   the appropriate line number, as established when the error was
+   detected, in the <a href=#origin>origin</a> of the <code><a href=#document>Document</a></code>
+   of the node of the <a href=#event-handler-content-attributes title="event handler content
+   attributes">event handler content attribute</a>, using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
+   handlers">event handler</a> of the <code><a href=#window>Window</a></code> object of
+   that <code><a href=#document>Document</a></code>, and abort these steps.</li>
+
    <li><p>Let <var title="">callback</var> be <var title="">H</var>'s
    value, the <code><a href=#function>Function</a></code> object that the <a href=#event-handlers title="event
    handlers">event handler</a> was last set to.</li>
@@ -69681,7 +69746,11 @@
    </li>
 
    <li><p>Return a <a href=#concept-task title=concept-task>task</a> that checks
-   if the entry for <var title="">handle</var> in <var title="">list</var> has been cleared, and if it has not, <a href=#create-a-script title="create a script">creates a script</a> using <var title="">script source</var> as the script source, <var title="">scripting language</var> as the scripting language, <var title="">global object</var> as the global object, <var title="">browsing context</var> as the browsing context, <var title="">document</var> as the document, <var title="">character
+   if the entry for <var title="">handle</var> in <var title="">list</var> has been cleared, and if it has not, <a href=#create-a-script title="create a script">creates a script</a> using <var title="">script source</var> as the script source, the
+   <a href=#url>URL</a> where <var title="">script source</var> can be
+   found, <var title="">scripting language</var> as the scripting
+   language, <var title="">global object</var> as the global object,
+   <var title="">browsing context</var> as the browsing context, <var title="">document</var> as the document, <var title="">character
    encoding</var> as the URL character encoding, and <var title="">base URL</var> as the base URL.</li>
 
   </ol><hr><p>The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the <dfn id=timer-task-source>timer task
@@ -78597,8 +78666,10 @@
   <p>Whenever an uncaught runtime script error occurs in one of the
   worker's scripts, if the error did not occur while handling a
   previous script error, the user agent must <a href=#report-the-error>report the
-  error</a> using the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <code title=handler-WorkerGlobalScope-onerror><a href=#handler-workerglobalscope-onerror>onerror</a></code>
-  attribute.
+  error</a> at the <a href=#url>URL</a> of the resource that contained
+  the script, with the line number where the error occurred, in the
+  <a href=#origin>origin</a> of the scripts running in the worker, using the
+  <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <code title=handler-WorkerGlobalScope-onerror><a href=#handler-workerglobalscope-onerror>onerror</a></code> attribute.
   </p>
 
   <p>For shared workers, if the error is still <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i> afterwards, or if
@@ -79142,7 +79213,8 @@
 
      <li>
 
-      <p><a href=#create-a-script>Create a script</a>, using <var title="">source</var> as the script source and <var title="">language</var> as the scripting language, using the
+      <p><a href=#create-a-script>Create a script</a>, using <var title="">source</var> as the script source, the <a href=#url>URL</a>
+      from which <var title="">source</var> was obtained, and <var title="">language</var> as the scripting language, using the
       same global object, browsing context, URL character encoding,
       base URL, and script group as the <a href=#concept-script title=concept-script>script</a> that was created by the
       worker's <a href=#run-a-worker>run a worker</a> algorithm.</p>

Modified: index
===================================================================
--- index	2011-11-04 17:34:58 UTC (rev 6818)
+++ index	2011-11-10 23:45:02 UTC (rev 6819)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 4 November 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 10 November 2011</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -16098,7 +16098,8 @@
 
         <p><a href=#create-a-script-from-a-node title="create a script from a node">Create a
         script</a> from the <code><a href=#the-script-element>script</a></code> element node, using
-        <var><a href="#the-script-block's-source">the script block's source</a></var> and <var><a href="#the-script-block's-type">the script
+        <var><a href="#the-script-block's-source">the script block's source</a></var>, the <a href=#url>URL</a>
+        from which the script was obtained, and <var><a href="#the-script-block's-type">the script
         block's type</a></var>.</p>
 
         <p class=note>This is where the script is compiled and
@@ -68008,10 +68009,10 @@
   <h5 id=creating-scripts><span class=secno>7.1.3.3 </span>Creating scripts</h5>
 
   <p>When the specification says that a <a href=#concept-script title=concept-script>script</a> is to be <dfn id=create-a-script title="create a
-  script">created</dfn>, given some script source, its scripting
-  language, a global object, a browsing context, a URL character
-  encoding, and a base URL, the user agent must run the following
-  steps:</p>
+  script">created</dfn>, given some script source, a script source
+  URL, its scripting language, a global object, a browsing context, a
+  URL character encoding, and a base URL, the user agent must run the
+  following steps:</p>
 
   <ol><li><p>If <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is
    disabled</a> for <a href=#browsing-context>browsing context</a> passed to this
@@ -68042,7 +68043,9 @@
     entry-point">Jump</a> to the <a href=#concept-script title=concept-script>script</a>'s <i><a href=#initial-code-entry-point>initial code
     entry-point</a></i>.</p>
 
-    <p>Otherwise, <a href=#report-the-error>report the error</a> using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
+    <p>Otherwise, <a href=#report-the-error>report the error</a> at the script source
+    URL, with the problematic line number, in the script's
+    <a href=#origin>origin</a>, using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
     handlers">event handler</a> of the <a href="#script's-global-object">script's global
     object</a>. If the error is still <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i> after this, then
     the error may be reported to the user.</p>
@@ -68050,19 +68053,20 @@
    </li>
 
   </ol><hr><p>When the user agent is to <dfn id=create-an-impotent-script>create an impotent script</dfn>,
-  given some script source, its scripting language, and a browsing
-  context, the user agent must <a href=#create-a-script>create a script</a>, using the
-  given script source and scripting language, using a new empty object
-  as the global object, and using the given browsing context as the
-  browsing context. The URL character encoding and base URL for the
-  resulting <a href=#concept-script title=concept-script>script</a> are not
-  important as no APIs are exposed to the script.</p>
+  given some script source and URL, its scripting language, and a
+  browsing context, the user agent must <a href=#create-a-script>create a script</a>,
+  using the given script source, URL, and scripting language, using a
+  new empty object as the global object, and using the given browsing
+  context as the browsing context. The URL character encoding and base
+  URL for the resulting <a href=#concept-script title=concept-script>script</a> are
+  not important as no APIs are exposed to the script.</p>
 
   <hr><p>When the specification says that a <a href=#concept-script title=concept-script>script</a> is to be <dfn id=create-a-script-from-a-node title="create a
-  script from a node">created from a node</dfn> <var title="">node</var>, given some script source and its scripting
-  language, the user agent must <a href=#create-a-script>create a script</a>, using
-  the given script source and scripting language, and using <a href=#the-script-settings-determined-from-the-node>the
-  script settings determined from the node</a> <var title="">node</var>.</p>
+  script from a node">created from a node</dfn> <var title="">node</var>, given some script source, its URL, and its
+  scripting language, the user agent must <a href=#create-a-script>create a
+  script</a>, using the given script source, URL, and scripting
+  language, and using <a href=#the-script-settings-determined-from-the-node>the script settings determined from the
+  node</a> <var title="">node</var>.</p>
 
   <p><dfn id=the-script-settings-determined-from-the-node>The script settings determined from the node</dfn> <var title="">node</var> are computed as follows:</p>
 
@@ -68125,35 +68129,42 @@
   <h5 id=runtime-script-errors><span class=secno>7.1.3.5 </span>Runtime script errors</h5>
 
   <p>When the user agent is required to <dfn id=report-the-error title="report the
-  error">report an error</dfn> <var title="">error</var> using the
-  <a href=#event-handlers title="event handlers">event handler</a> <var title="">onerror</var>, it must run these steps, after which the
-  error is either <dfn id=concept-error-handled title=concept-error-handled><i>handled</i></dfn> or <dfn id=concept-error-nothandled title=concept-error-nothandled><i>not handled</i></dfn>:</p>
+  error">report an error</dfn> at a particular <a href=#url>URL</a> <var title="">location</var> with a particular line number <var title="">line</var> in a particular origin <var title="">origin</var>, using the <a href=#event-handlers title="event handlers">event
+  handler</a> <var title="">onerror</var>, it must run these steps,
+  after which the error is either <dfn id=concept-error-handled title=concept-error-handled><i>handled</i></dfn> or <dfn id=concept-error-nothandled title=concept-error-nothandled><i>not handled</i></dfn>:</p>
 
   <dl class=switch><dt>If the value of <var title="">onerror</var> is a
    <code><a href=#function>Function</a></code></dt>
 
    <dd>
 
-    <p>The function must be invoked with three arguments. The first
-    two arguments passed to the function must be of type
-    <code>DOMString</code>, and the third must be of type
-    <code>unsigned long</code>. The first must give the message that
-    the UA is considering reporting, the second must give the
-    <a href=#absolute-url>absolute URL</a> of the resource in which the error
-    occurred, and the third must give the line number in that resource
-    on which the error occurred.</p>
+    <ol><li><p>Let <var title="">message</var> be a user-agent-defined
+     string describing the error in a helpful manner.</li>
 
-    <p>If the function returns false, then the error is <i title=concept-error-handled><a href=#concept-error-handled>handled</a></i>. Otherwise, the error is
-    <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
+     <li><p>If the <var title="">location</var> <a href=#url>URL</a> does
+     not have a <a href=#same-origin title="same origin">same</a>
+     <a href=#origin>origin</a> as the <var title="">origin</var>, then set
+     <var title="">message</var> to "<code title="">Script
+     error.</code>", set <var title="">location</var> to the empty
+     string, and set <var title="">line</var> to 0.</li>
 
-    <p>Any uncaught exceptions thrown or errors caused by this
-    function may be reported to the user immediately after the error
-    that the function was called for; the <a href=#report-the-error title="report the
-    error">report an error</a> algorithm must not be used to handle
-    exceptions thrown or errors caused by this function.</p>
+     <li>
 
-   </dd>
+      <p>The function must be invoked with three arguments: <var title="">message</var>, <var title="">location</var>, and <var title="">line</var>.</p>
 
+      <p>If the function returns false, then the error is <i title=concept-error-handled><a href=#concept-error-handled>handled</a></i>. Otherwise, the error is
+      <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
+
+      <p>Any uncaught exceptions thrown or errors caused by this
+      function may be reported to the user immediately after the error
+      that the function was called for; the <a href=#report-the-error title="report the
+      error">report an error</a> algorithm must not be used to handle
+      exceptions thrown or errors caused by this function.</p>
+
+     </li>
+
+    </ol></dd>
+
    <dt>Otherwise</dt>
 
    <dd>
@@ -68166,11 +68177,34 @@
 
   <p>Whenever an uncaught runtime script error occurs in one of the
   scripts associated with a <code><a href=#document>Document</a></code>, the user agent must
-  <a href=#report-the-error>report the error</a> using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
+  <a href=#report-the-error>report the error</a> at the URL of the resource containing
+  the script (as established when the <a href=#concept-script title=concept-script>script</a> was <a href=#create-a-script title="create a
+  script">created</a>), with the problematic line number in that
+  resource, in the script's <a href=#origin>origin</a>, using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
   handlers">event handler</a> of the <a href="#script's-global-object">script's global
   object</a>. If the error is still <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i> after this, then
   the error may be reported to the user.</p>
 
+  <p>The resource containing the script will typically be the file
+  from which the <code><a href=#document>Document</a></code> was parsed, e.g. for inline
+  <code><a href=#the-script-element>script</a></code> elements or <a href=#event-handler-content-attributes>event handler content
+  attributes</a>; or the JavaScript file that the script was in,
+  for external scripts. Even for dynamically-generated scripts, user
+  agents are strongly encouraged to attempt to keep track of the
+  original source of a script. For example, if an external script uses
+  the <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> API to
+  insert an inline <code><a href=#the-script-element>script</a></code> element during parsing, the URL
+  of the resource containing the script would ideally be reported as
+  being the external script, and the line number might ideally be
+  reported as the line with the <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> call or where the
+  string passed to that call was first constructed. Naturally,
+  implementing this can be somewhat non-trivial.</p>
+
+  <p>User agents are similarly encouraged to keep careful track of the
+  original line numbers, even in the face of <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> calls mutating
+  the document as it is parsed, or <a href=#event-handler-content-attributes>event handler content
+  attributes</a> spanning multiple lines.</p>
+
   </div>
 
 
@@ -68514,7 +68548,9 @@
       <p><a href=#create-a-script-from-a-node title="create a script from a node">Create a
       script</a> from the <code><a href=#document>Document</a></code> node of the
       <a href=#active-document>active document</a>, using the aforementioned script
-      source, and assuming the scripting language is JavaScript.</p>
+      source, the <a href=#url>URL</a> of the resource where the
+      <code>javascript:</code> URL, was found, and assuming the
+      scripting language is JavaScript.</p>
 
       <p>Let <var title="">result</var> be the return value of the
       <i><a href=#initial-code-entry-point>initial code entry-point</a></i> of this <a href=#concept-script title=concept-script>script</a>. If an exception was
@@ -68655,6 +68691,13 @@
   requirements, in particular the <code title=handler-MessagePort-onmessage><a href=#handler-messageport-onmessage>onmessage</a></code> attribute of
   <code><a href=#messageport>MessagePort</a></code> objects.</p>
 
+  <p>On getting, <a href=#event-handler-idl-attributes>event handler IDL attributes</a> must return
+  the value of their corresponding event handlers, except when the
+  value is an <a href=#concept-handler-error title=concept-handler-error>internal error
+  value</a>, in which case the user agent must set the corresponding
+  event handler to null, and then throw an exception corresponding to
+  the error condition.</p>
+
   <hr></div>
 
   <p><dfn id=event-handler-content-attributes>Event handler content attributes</dfn>, when specified, must
@@ -68687,7 +68730,8 @@
 
     <p>If <var title="">body</var> is not parsable as
     <i>FunctionBody</i> or if parsing detects an <i>early error</i>
-    then abort these steps.</p>
+    then <a href=#set-the-event-handler-content-attribute-to-an-error>set the event handler content attribute to an
+    error</a> as defined below, and abort these steps.</p>
 
     <p class=note><i>FunctionBody</i> is defined in ECMAScript
     edition 5 section 13 Function Definition. <i>Early error</i> is
@@ -68714,7 +68758,9 @@
 
     <p>If <var title="">strict</var> is true, and anything in <var
     title="">body</var> is a <code>SyntaxError</code> according to the
-    Strict Mode Restrictions, then abort these steps.</p>
+    Strict Mode Restrictions, then <span>set the event handler content
+    attribute to an error</span> as defined below, and abort these
+    steps.</p>
 
     <p class="note">The Strict Mode Restrictions are those listed in
     ECMAScript edition 5 section 13.1 Strict Mode Restrictions. <a
@@ -68786,8 +68832,18 @@
    <li><p>Set the corresponding <a href=#event-handlers title="event handlers">event
    handler</a> to the aforementioned function.</li>
 
-  </ol><p>When an event handler content attribute is removed, the user
+  </ol><p>When a user agent is required, by the steps above, to <dfn id=set-the-event-handler-content-attribute-to-an-error>set
+  the event handler content attribute to an error</dfn>, the user
   agent must set the corresponding <a href=#event-handlers title="event handlers">event
+  handler</a> to an <dfn id=concept-handler-error title=concept-handler-error>internal
+  error value</dfn> representing the error condition, keeping track of
+  the <a href=#url>URL</a> of the resource where the <a href=#event-handler-content-attributes title="event
+  handler content attributes">event handler content attribute</a>
+  was set, and the relevant line number inside that resource where the
+  error occurred.</p>
+
+  <p>When an event handler content attribute is removed, the user
+  agent must set the corresponding <a href=#event-handlers title="event handlers">event
   handler</a> to null.</p>
   <!--
   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/245 onload
@@ -68809,9 +68865,8 @@
 
   <hr><p>When an <a href=#event-handlers title="event handlers">event handler</a> <var title="">H</var> of an element or object <var title="">T</var>
   implementing the <code><a href=#eventtarget>EventTarget</a></code> interface is first set to
-  a non-null <code><a href=#function>Function</a></code> object, the user agent must append
-  an <a href=#concept-event-listener title=concept-event-listener>event listener</a> to the
-  list of <a href=#concept-event-listener title=concept-event-listener>event listeners</a>
+  a non-null value, the user agent must append an <a href=#concept-event-listener title=concept-event-listener>event listener</a> to the list of
+  <a href=#concept-event-listener title=concept-event-listener>event listeners</a>
   associated with <var title="">T</var> with <i>type</i> set to the
   <dfn id=event-handler-event-type>event handler event type</dfn> corresponding to <var title="">H</var>, <i>capture</i> set to false, and <i>listener</i>
   set to <a href=#the-event-handler-processing-algorithm>the event handler processing algorithm</a> defined
@@ -68867,6 +68922,16 @@
   <ol><li><p>If <var title="">H</var>'s value is null, then abort these
    steps.</li>
 
+   <li><p>If <var title="">H</var>'s value is an <a href=#concept-handler-error title=concept-handler-error>internal error value</a>, then set
+   the <a href=#event-handlers title="event handlers">event handler</a> to null and
+   then <a href=#report-the-error>report the error</a> at the appropriate URL and with
+   the appropriate line number, as established when the error was
+   detected, in the <a href=#origin>origin</a> of the <code><a href=#document>Document</a></code>
+   of the node of the <a href=#event-handler-content-attributes title="event handler content
+   attributes">event handler content attribute</a>, using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
+   handlers">event handler</a> of the <code><a href=#window>Window</a></code> object of
+   that <code><a href=#document>Document</a></code>, and abort these steps.</li>
+
    <li><p>Let <var title="">callback</var> be <var title="">H</var>'s
    value, the <code><a href=#function>Function</a></code> object that the <a href=#event-handlers title="event
    handlers">event handler</a> was last set to.</li>
@@ -69681,7 +69746,11 @@
    </li>
 
    <li><p>Return a <a href=#concept-task title=concept-task>task</a> that checks
-   if the entry for <var title="">handle</var> in <var title="">list</var> has been cleared, and if it has not, <a href=#create-a-script title="create a script">creates a script</a> using <var title="">script source</var> as the script source, <var title="">scripting language</var> as the scripting language, <var title="">global object</var> as the global object, <var title="">browsing context</var> as the browsing context, <var title="">document</var> as the document, <var title="">character
+   if the entry for <var title="">handle</var> in <var title="">list</var> has been cleared, and if it has not, <a href=#create-a-script title="create a script">creates a script</a> using <var title="">script source</var> as the script source, the
+   <a href=#url>URL</a> where <var title="">script source</var> can be
+   found, <var title="">scripting language</var> as the scripting
+   language, <var title="">global object</var> as the global object,
+   <var title="">browsing context</var> as the browsing context, <var title="">document</var> as the document, <var title="">character
    encoding</var> as the URL character encoding, and <var title="">base URL</var> as the base URL.</li>
 
   </ol><hr><p>The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the <dfn id=timer-task-source>timer task
@@ -78597,8 +78666,10 @@
   <p>Whenever an uncaught runtime script error occurs in one of the
   worker's scripts, if the error did not occur while handling a
   previous script error, the user agent must <a href=#report-the-error>report the
-  error</a> using the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <code title=handler-WorkerGlobalScope-onerror><a href=#handler-workerglobalscope-onerror>onerror</a></code>
-  attribute.
+  error</a> at the <a href=#url>URL</a> of the resource that contained
+  the script, with the line number where the error occurred, in the
+  <a href=#origin>origin</a> of the scripts running in the worker, using the
+  <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <code title=handler-WorkerGlobalScope-onerror><a href=#handler-workerglobalscope-onerror>onerror</a></code> attribute.
   </p>
 
   <p>For shared workers, if the error is still <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i> afterwards, or if
@@ -79142,7 +79213,8 @@
 
      <li>
 
-      <p><a href=#create-a-script>Create a script</a>, using <var title="">source</var> as the script source and <var title="">language</var> as the scripting language, using the
+      <p><a href=#create-a-script>Create a script</a>, using <var title="">source</var> as the script source, the <a href=#url>URL</a>
+      from which <var title="">source</var> was obtained, and <var title="">language</var> as the scripting language, using the
       same global object, browsing context, URL character encoding,
       base URL, and script group as the <a href=#concept-script title=concept-script>script</a> that was created by the
       worker's <a href=#run-a-worker>run a worker</a> algorithm.</p>

Modified: source
===================================================================
--- source	2011-11-04 17:34:58 UTC (rev 6818)
+++ source	2011-11-10 23:45:02 UTC (rev 6819)
@@ -17139,7 +17139,8 @@
 
         <p><span title="create a script from a node">Create a
         script</span> from the <code>script</code> element node, using
-        <var>the script block's source</var> and <var>the script
+        <var>the script block's source</var>, the <span>URL</span>
+        from which the script was obtained, and <var>the script
         block's type</var>.</p>
 
         <p class="note">This is where the script is compiled and
@@ -77258,10 +77259,10 @@
 
   <p>When the specification says that a <span
   title="concept-script">script</span> is to be <dfn title="create a
-  script">created</dfn>, given some script source, its scripting
-  language, a global object, a browsing context, a URL character
-  encoding, and a base URL, the user agent must run the following
-  steps:</p>
+  script">created</dfn>, given some script source, a script source
+  URL, its scripting language, a global object, a browsing context, a
+  URL character encoding, and a base URL, the user agent must run the
+  following steps:</p>
 
   <ol>
 
@@ -77295,7 +77296,9 @@
     title="concept-script">script</span>'s <i>initial code
     entry-point</i>.</p>
 
-    <p>Otherwise, <span>report the error</span> using the <code
+    <p>Otherwise, <span>report the error</span> at the script source
+    URL, with the problematic line number, in the script's
+    <span>origin</span>, using the <code
     title="handler-window-onerror">onerror</code> <span title="event
     handlers">event handler</span> of the <span>script's global
     object</span>. If the error is still <i
@@ -77309,24 +77312,24 @@
   <hr>
 
   <p>When the user agent is to <dfn>create an impotent script</dfn>,
-  given some script source, its scripting language, and a browsing
-  context, the user agent must <span>create a script</span>, using the
-  given script source and scripting language, using a new empty object
-  as the global object, and using the given browsing context as the
-  browsing context. The URL character encoding and base URL for the
-  resulting <span title="concept-script">script</span> are not
-  important as no APIs are exposed to the script.</p>
+  given some script source and URL, its scripting language, and a
+  browsing context, the user agent must <span>create a script</span>,
+  using the given script source, URL, and scripting language, using a
+  new empty object as the global object, and using the given browsing
+  context as the browsing context. The URL character encoding and base
+  URL for the resulting <span title="concept-script">script</span> are
+  not important as no APIs are exposed to the script.</p>
 
   <hr>
 
   <p>When the specification says that a <span
   title="concept-script">script</span> is to be <dfn title="create a
   script from a node">created from a node</dfn> <var
-  title="">node</var>, given some script source and its scripting
-  language, the user agent must <span>create a script</span>, using
-  the given script source and scripting language, and using <span>the
-  script settings determined from the node</span> <var
-  title="">node</var>.</p>
+  title="">node</var>, given some script source, its URL, and its
+  scripting language, the user agent must <span>create a
+  script</span>, using the given script source, URL, and scripting
+  language, and using <span>the script settings determined from the
+  node</span> <var title="">node</var>.</p>
 
   <p><dfn>The script settings determined from the node</dfn> <var
   title="">node</var> are computed as follows:</p>
@@ -77397,10 +77400,12 @@
   <h5 id="runtime-script-errors">Runtime script errors</h5>
 
   <p>When the user agent is required to <dfn title="report the
-  error">report an error</dfn> <var title="">error</var> using the
-  <span title="event handlers">event handler</span> <var
-  title="">onerror</var>, it must run these steps, after which the
-  error is either <dfn
+  error">report an error</dfn> at a particular <span>URL</span> <var
+  title="">location</var> with a particular line number <var
+  title="">line</var> in a particular origin <var
+  title="">origin</var>, using the <span title="event handlers">event
+  handler</span> <var title="">onerror</var>, it must run these steps,
+  after which the error is either <dfn
   title="concept-error-handled"><i>handled</i></dfn> or <dfn
   title="concept-error-nothandled"><i>not handled</i></dfn>:</p>
 
@@ -77411,25 +77416,38 @@
 
    <dd>
 
-    <p>The function must be invoked with three arguments. The first
-    two arguments passed to the function must be of type
-    <code>DOMString</code>, and the third must be of type
-    <code>unsigned long</code>. The first must give the message that
-    the UA is considering reporting, the second must give the
-    <span>absolute URL</span> of the resource in which the error
-    occurred, and the third must give the line number in that resource
-    on which the error occurred.</p>
+    <ol>
 
-    <p>If the function returns false, then the error is <i
-    title="concept-error-handled">handled</i>. Otherwise, the error is
-    <i title="concept-error-nothandled">not handled</i>.</p>
+     <li><p>Let <var title="">message</var> be a user-agent-defined
+     string describing the error in a helpful manner.</p></li>
 
-    <p>Any uncaught exceptions thrown or errors caused by this
-    function may be reported to the user immediately after the error
-    that the function was called for; the <span title="report the
-    error">report an error</span> algorithm must not be used to handle
-    exceptions thrown or errors caused by this function.</p>
+     <li><p>If the <var title="">location</var> <span>URL</span> does
+     not have a <span title="same origin">same</span>
+     <span>origin</span> as the <var title="">origin</var>, then set
+     <var title="">message</var> to "<code title="">Script
+     error.</code>", set <var title="">location</var> to the empty
+     string, and set <var title="">line</var> to 0.</p></li>
 
+     <li>
+
+      <p>The function must be invoked with three arguments: <var
+      title="">message</var>, <var title="">location</var>, and <var
+      title="">line</var>.</p>
+
+      <p>If the function returns false, then the error is <i
+      title="concept-error-handled">handled</i>. Otherwise, the error is
+      <i title="concept-error-nothandled">not handled</i>.</p>
+
+      <p>Any uncaught exceptions thrown or errors caused by this
+      function may be reported to the user immediately after the error
+      that the function was called for; the <span title="report the
+      error">report an error</span> algorithm must not be used to handle
+      exceptions thrown or errors caused by this function.</p>
+
+     </li>
+
+    </ol>
+
    </dd>
 
    <dt>Otherwise</dt>
@@ -77447,13 +77465,39 @@
 
   <p>Whenever an uncaught runtime script error occurs in one of the
   scripts associated with a <code>Document</code>, the user agent must
-  <span>report the error</span> using the <code
+  <span>report the error</span> at the URL of the resource containing
+  the script (as established when the <span
+  title="concept-script">script</span> was <span title="create a
+  script">created</span>), with the problematic line number in that
+  resource, in the script's <span>origin</span>, using the <code
   title="handler-window-onerror">onerror</code> <span title="event
   handlers">event handler</span> of the <span>script's global
   object</span>. If the error is still <i
   title="concept-error-nothandled">not handled</i> after this, then
   the error may be reported to the user.</p>
 
+  <p>The resource containing the script will typically be the file
+  from which the <code>Document</code> was parsed, e.g. for inline
+  <code>script</code> elements or <span>event handler content
+  attributes</span>; or the JavaScript file that the script was in,
+  for external scripts. Even for dynamically-generated scripts, user
+  agents are strongly encouraged to attempt to keep track of the
+  original source of a script. For example, if an external script uses
+  the <code title="dom-document-write">document.write()</code> API to
+  insert an inline <code>script</code> element during parsing, the URL
+  of the resource containing the script would ideally be reported as
+  being the external script, and the line number might ideally be
+  reported as the line with the <code
+  title="dom-document-write">document.write()</code> call or where the
+  string passed to that call was first constructed. Naturally,
+  implementing this can be somewhat non-trivial.</p>
+
+  <p>User agents are similarly encouraged to keep careful track of the
+  original line numbers, even in the face of <code
+  title="dom-document-write">document.write()</code> calls mutating
+  the document as it is parsed, or <span>event handler content
+  attributes</span> spanning multiple lines.</p>
+
   </div>
 
 
@@ -77860,7 +77904,9 @@
       <p><span title="create a script from a node">Create a
       script</span> from the <code>Document</code> node of the
       <span>active document</span>, using the aforementioned script
-      source, and assuming the scripting language is JavaScript.</p>
+      source, the <span>URL</span> of the resource where the
+      <code>javascript:</code> URL, was found, and assuming the
+      scripting language is JavaScript.</p>
 
       <p>Let <var title="">result</var> be the return value of the
       <i>initial code entry-point</i> of this <span
@@ -78014,6 +78060,13 @@
   title="handler-MessagePort-onmessage">onmessage</code> attribute of
   <code>MessagePort</code> objects.</p>
 
+  <p>On getting, <span>event handler IDL attributes</span> must return
+  the value of their corresponding event handlers, except when the
+  value is an <span title="concept-handler-error">internal error
+  value</span>, in which case the user agent must set the corresponding
+  event handler to null, and then throw an exception corresponding to
+  the error condition.</p>
+
   <hr>
 
   </div>
@@ -78051,7 +78104,8 @@
 
     <p>If <var title="">body</var> is not parsable as
     <i>FunctionBody</i> or if parsing detects an <i>early error</i>
-    then abort these steps.</p>
+    then <span>set the event handler content attribute to an
+    error</span> as defined below, and abort these steps.</p>
 
     <p class="note"><i>FunctionBody</i> is defined in ECMAScript
     edition 5 section 13 Function Definition. <i>Early error</i> is
@@ -78082,7 +78136,9 @@
 
     <p>If <var title="">strict</var> is true, and anything in <var
     title="">body</var> is a <code>SyntaxError</code> according to the
-    Strict Mode Restrictions, then abort these steps.</p>
+    Strict Mode Restrictions, then <span>set the event handler content
+    attribute to an error</span> as defined below, and abort these
+    steps.</p>
 
     <p class="note">The Strict Mode Restrictions are those listed in
     ECMAScript edition 5 section 13.1 Strict Mode Restrictions. <a
@@ -78176,6 +78232,16 @@
 
   </ol>
 
+  <p>When a user agent is required, by the steps above, to <dfn>set
+  the event handler content attribute to an error</dfn>, the user
+  agent must set the corresponding <span title="event handlers">event
+  handler</span> to an <dfn title="concept-handler-error">internal
+  error value</dfn> representing the error condition, keeping track of
+  the <span>URL</span> of the resource where the <span title="event
+  handler content attributes">event handler content attribute</span>
+  was set, and the relevant line number inside that resource where the
+  error occurred.</p>
+
   <p>When an event handler content attribute is removed, the user
   agent must set the corresponding <span title="event handlers">event
   handler</span> to null.</p>
@@ -78202,9 +78268,9 @@
   <p>When an <span title="event handlers">event handler</span> <var
   title="">H</var> of an element or object <var title="">T</var>
   implementing the <code>EventTarget</code> interface is first set to
-  a non-null <code>Function</code> object, the user agent must append
-  an <span title="concept-event-listener">event listener</span> to the
-  list of <span title="concept-event-listener">event listeners</span>
+  a non-null value, the user agent must append an <span
+  title="concept-event-listener">event listener</span> to the list of
+  <span title="concept-event-listener">event listeners</span>
   associated with <var title="">T</var> with <i>type</i> set to the
   <dfn>event handler event type</dfn> corresponding to <var
   title="">H</var>, <i>capture</i> set to false, and <i>listener</i>
@@ -78268,6 +78334,18 @@
    <li><p>If <var title="">H</var>'s value is null, then abort these
    steps.</p></li>
 
+   <li><p>If <var title="">H</var>'s value is an <span
+   title="concept-handler-error">internal error value</span>, then set
+   the <span title="event handlers">event handler</span> to null and
+   then <span>report the error</span> at the appropriate URL and with
+   the appropriate line number, as established when the error was
+   detected, in the <span>origin</span> of the <code>Document</code>
+   of the node of the <span title="event handler content
+   attributes">event handler content attribute</span>, using the <code
+   title="handler-window-onerror">onerror</code> <span title="event
+   handlers">event handler</span> of the <code>Window</code> object of
+   that <code>Document</code>, and abort these steps.</p></li>
+
    <li><p>Let <var title="">callback</var> be <var title="">H</var>'s
    value, the <code>Function</code> object that the <span title="event
    handlers">event handler</span> was last set to.</p></li>
@@ -79224,10 +79302,11 @@
    if the entry for <var title="">handle</var> in <var
    title="">list</var> has been cleared, and if it has not, <span
    title="create a script">creates a script</span> using <var
-   title="">script source</var> as the script source, <var
-   title="">scripting language</var> as the scripting language, <var
-   title="">global object</var> as the global object, <var
-   title="">browsing context</var> as the browsing context, <var
+   title="">script source</var> as the script source, the
+   <span>URL</span> where <var title="">script source</var> can be
+   found, <var title="">scripting language</var> as the scripting
+   language, <var title="">global object</var> as the global object,
+   <var title="">browsing context</var> as the browsing context, <var
    title="">document</var> as the document, <var title="">character
    encoding</var> as the URL character encoding, and <var
    title="">base URL</var> as the base URL.</p></li>
@@ -88814,9 +88893,11 @@
   <p>Whenever an uncaught runtime script error occurs in one of the
   worker's scripts, if the error did not occur while handling a
   previous script error, the user agent must <span>report the
-  error</span> using the <code>WorkerGlobalScope</code> object's <code
-  title="handler-WorkerGlobalScope-onerror">onerror</code>
-  attribute.
+  error</span> at the <span>URL</span> of the resource that contained
+  the script, with the line number where the error occurred, in the
+  <span>origin</span> of the scripts running in the worker, using the
+  <code>WorkerGlobalScope</code> object's <code
+  title="handler-WorkerGlobalScope-onerror">onerror</code> attribute.
   <!--END complete--><!--END epub-->
   <a href="#refsHTML">[HTML]</a>
   <!--START complete--><!--START epub-->
@@ -89470,7 +89551,8 @@
      <li>
 
       <p><span>Create a script</span>, using <var
-      title="">source</var> as the script source and <var
+      title="">source</var> as the script source, the <span>URL</span>
+      from which <var title="">source</var> was obtained, and <var
       title="">language</var> as the scripting language, using the
       same global object, browsing context, URL character encoding,
       base URL, and script group as the <span




More information about the Commit-Watchers mailing list