[html5] r4567 - [e] (0) Update references from ES3 to ES5. Fixing http://www.w3.org/Bugs/Public/ [...]

whatwg at whatwg.org whatwg at whatwg.org
Sun Jan 10 22:47:47 PST 2010


Author: ianh
Date: 2010-01-10 22:47:44 -0800 (Sun, 10 Jan 2010)
New Revision: 4567

Modified:
   complete.html
   index
   source
Log:
[e] (0) Update references from ES3 to ES5.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8575

Modified: complete.html
===================================================================
--- complete.html	2010-01-11 04:48:30 UTC (rev 4566)
+++ complete.html	2010-01-11 06:47:44 UTC (rev 4567)
@@ -35689,7 +35689,7 @@
   attribute is specified and the attribute's value, when compiled as a
   JavaScript regular expression with the <code title="">global</code>,
   <code title="">ignoreCase</code>, and <code title="">multiline</code> flags <em>disabled</em> (see ECMA262
-  Edition 3, sections 15.10.7.2 through 15.10.7.4), compiles
+  Edition 5, sections 15.10.7.2 through 15.10.7.4), compiles
   successfully but the resulting regular expression does not match the
   entirety of the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, then the element is
   <a href=#suffering-from-a-pattern-mismatch>suffering from a pattern mismatch</a>. <a href=#refsECMA262>[ECMA262]</a></p>
@@ -41668,13 +41668,13 @@
   </ul>
 
   <p>Where the above requirements say that a value is to be a string,
-  the user agent must apply the ToString() conversion operator to the
+  the user agent must apply the ToString() abstract operation to the
   value, assume that the value was indeed a string, and use the result
   in the rest of the algorithm as if it had that had been the value
   passed to the method. <a href="#refsECMA262">[ECMA262]</a></p>
 
   <p>Where the above requirements say that a value is to be a number,
-  the user agent must first apply the ToNumber() conversion operator
+  the user agent must first apply the ToNumber() abstract operation
   to the value, and then verify that the result is neither an Infinity
   value nor a Not-a-Number (NaN) value. If this result is indeed
   acceptable (i.e. finite), the user agent must use the result in the
@@ -41682,14 +41682,14 @@
   the method. <a href="#refsECMA262">[ECMA262]</a></p>
 
   <p>Where the above requirements say that a value is to be an
-  integer, the user agent must first apply the ToNumber() conversion
-  operator to the value, and then verify that the result is a finite
+  integer, the user agent must first apply the ToNumber() abstract
+  operation to the value, and then verify that the result is a finite
   integer. If so, the user agent must use the result in the rest of
   the algorithm as if it had that had been the value passed to the
   method. <a href="#refsECMA262">[ECMA262]</a></p>
 
   <p>Where the above requirements say that a value is to be a boolean,
-  the user agent must apply the ToBoolean() conversion operator to the
+  the user agent must apply the ToBoolean() abstract operation to the
   value, assume that the value was indeed a boolean, and use the
   result in the rest of the algorithm as if it had that had been the
   value passed to the method. <a href="#refsECMA262">[ECMA262]</a></p>
@@ -41779,7 +41779,7 @@
     steps.</p>
 
     <p>To check if a value is an integer, the user agent must first
-    apply the ToNumber() conversion operator to the value, and then
+    apply the ToNumber() abstract operation to the value, and then
     verify that the result is a finite integer. If so, the user agent
     must use the result in the rest of the algorithm as if it had that
     had been the value passed to the method. <a
@@ -51014,15 +51014,19 @@
     environment.</p>
 
     <p>If the <a href="#script's-global-object">script's global object</a> is a
-    <code><a href=#window>Window</a></code> object, then in JavaScript, the <code title="">this</code> keyword in the global scope must return the
-    <code><a href=#window>Window</a></code> object's <code><a href=#windowproxy>WindowProxy</a></code> object.</p>
+    <code><a href=#window>Window</a></code> object, then in JavaScript, the ThisBinding of
+    the global execution context for this script must be the
+    <code><a href=#window>Window</a></code> object's <code><a href=#windowproxy>WindowProxy</a></code> object,
+    rather than the global object. <a href=#refsECMA262>[ECMA262]</a></p>
 
     <p class=note>This is a <a href=#willful-violation>willful violation</a> of the
     JavaScript specification current at the time of writing
-    (ECMAScript edition 3). The JavaScript specification requires that
-    the <code title="">this</code> keyword in the global scope return
-    the global object, but this is not compatible with the security
-    design prevalent in implementations as specified herein. <a href=#refsECMA262>[ECMA262]</a></p>
+    (ECMAScript edition 5, as defined in section 10.4.1.1 Initial
+    Global Execution Context, step 3). The JavaScript specification
+    requires that the <code title="">this</code> keyword in the global
+    scope return the global object, but this is not compatible with
+    the security design prevalent in implementations as specified
+    herein. <a href=#refsECMA262>[ECMA262]</a></p>
 
    </dd>
 
@@ -51625,43 +51629,67 @@
   <div class=impl>
 
   <!-- SCRIPT EXEC -->
-  <p>When an event handler content attribute is set, if the element is
-  owned by a <code>Document</code> that is in a <a href=#browsing-context>browsing
-  context</a>, and <a href=#concept-bc-script title=concept-bc-script>scripting is
-  enabled</a> for that <a href=#browsing-context>browsing context</a>, the user
-  agent must run the following steps to create a <a href=#concept-script title=concept-script>script</a> after setting the content
-  attribute to its new value:</p>
+  <p>When an <span>event handler content attribute</span> is set, if
+  the element is owned by a <code>Document</code> that is in a
+  <a href=#browsing-context>browsing context</a>, and <a href=#concept-bc-script title=concept-bc-script>scripting is enabled</a> for that
+  <a href=#browsing-context>browsing context</a>, the user agent must run the following
+  steps to create a <a href=#concept-script title=concept-script>script</a> after
+  setting the content attribute to its new value:</p>
 
   <ol><li><p>Set up a <a href=#script-execution-environment>script execution environment</a> for
    JavaScript.</li>
 
    <li>
 
-    <p>Using this script execution environment, interpret the
-    attribute's new value as the body of an anonymous function, with
-    the function's arguments set as follows:</p>
+    <p>Using this script execution environment, create a function
+    object (as defined in ECMAScript edition 5 section 13.2 Creating
+    Function Objects), with:</p>
 
-    <dl class=switch><dt>If the attribute is the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> attribute of the
-     <code><a href=#window>Window</a></code> object</dt>
+    <dl><dt>Parameter list <var title="">FormalParameterList</var></dt>
 
-     <dd>Let the function have three arguments, named <code title="">event</code>, <code title="">source</code>, and <code title="">fileno</code>.</dd>
+     <dd>
 
-     <dt>Otherwise</dt>
+      <dl class=switch><dt>If the attribute is the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> attribute of the
+       <code><a href=#window>Window</a></code> object</dt>
 
-     <dd>Let the function have a single argument called <code title="">event</code>.</dd>
+       <dd>Let the function have three arguments, named <code title="">event</code>, <code title="">source</code>, and <code title="">fileno</code>.</dd>
 
-    </dl><p>Link the new function's scope chain from the activation object
-    of the handler, to the element's object, to the element's
-    <a href=#form-owner>form owner</a>, if it has one, to the element's
-    <code>Document</code> object, to the <code><a href=#window>Window</a></code> object of
-    that <code>Document</code>. Set the function's <code>this</code>
-    parameter to the <code>Element</code> object representing the
-    element. Let this function be the only entry in the script's
+       <dt>Otherwise</dt>
+
+       <dd>Let the function have a single argument called <code title="">event</code>.</dd>
+
+      </dl></dd>
+
+     <dt>Function body <var title="">FunctionBody</var></dt>
+
+     <dd>The <span>event handler content attribute</span>'s new value.</dd>
+
+     <dt>Lexical Environment <var title="">Scope</var></dt>
+
+     <dd>
+
+      <ol><li>Let <var title="">Scope</var> be the result of
+       NewObjectEnvironment(the element's <code>Document</code>, the
+       <var title="">global environment</var>).</li>
+
+       <li>If the element has a <a href=#form-owner>form owner</a>, let <var title="">Scope</var> be the result of NewObjectEnvironment(the
+       element's <a href=#form-owner>form owner</a>, <var title="">Scope</var>).</li>
+
+       <li>Let <var title="">Scope</var> be the result of
+       NewObjectEnvironment(the element's object, <var title="">Scope</var>).</li>
+
+      </ol><p class=note>NewObjectEnvironment() is defined in ECMAScript
+      edition 5 section 10.2.2.3 NewObjectEnvironment (O, E). <a href=#refsECMA262>[ECMA262]</a></p>
+
+     </dd>
+
+     <dt>Boolean flag <var title="">Strict</var></dt>
+
+     <dd>False.</dd>
+
+    </dl><p>Let this new function be the only entry in the script's
     <a href=#list-of-code-entry-points>list of code entry-points</a>.</p>
 
-    <p class=note>See ECMA262 Edition 3, sections 10.1.6 and 10.2.3,
-    for more details on activation objects. <a href=#refsECMA262>[ECMA262]</a></p>
-
    </li>
 
    <li><p>If the previous steps failed to compile the script, then set
@@ -51771,6 +51799,23 @@
   <p class=note>In JavaScript, any <code title="">Function</code>
   object implements this interface.</p>
 
+  <p>If the <code><a href=#function>Function</a></code> object is a JavaScript <code title="">Function</code>, then when it is invoked by the user agent,
+  the user agent must set the <var title="">thisArg</var> (as defined
+  by ECMAScript edition 5 section 10.4.3 Entering Function Code) to
+  the <a href=#event-handlers title="event handlers">event handler</a>'s object. <a href=#refsECMA262>[ECMA262]</a></p>
+
+  <div class=example>
+
+   <p>For example, the following document fragment:</p>
+
+   <pre><body onload="alert(this)" onclick="alert(this)"></pre>
+
+   <p>...leads to an alert saying "<code title="">[object Window]</code>" when the document is loaded,
+   and an alert saying "<code title="">[object HTMLBodyElement]</code>" whenever the user
+   clicks something in the page.</p>
+
+  </div>
+
   <p>The return value of the function is affects whether the event is
   canceled or not: <span class=impl>as described above,</span> if
   the return value is false, the event is canceled (except for <code class=event-mouseover>mouseover</code> events, where the return
@@ -52237,9 +52282,9 @@
 
    </li>
 
-   <li><p>Apply the ToString() conversion operator to the first
+   <li><p>Apply the ToString() abstract operation to the first
    argument to the method, and let <var title="">script source</var>
-   be the result.</li>
+   be the result. <a href=#refsECMA262>[ECMA262]</a></li>
 
    <li><p>Let <var title="">script language</var> be
    JavaScript.</li>
@@ -52286,11 +52331,11 @@
   <ol><li><p>Let <var title="">timeout</var> be the second argument to
    the method, or zero if the argument was omitted.</li>
 
-   <li><p>Apply the ToString() conversion operator to <var title="">timeout</var>, and let <var title="">timeout</var>
-   be the result.</li>
+   <li><p>Apply the ToString() abstract operation to <var title="">timeout</var>, and let <var title="">timeout</var>
+   be the result. <a href=#refsECMA262>[ECMA262]</a></li>
 
-   <li><p>Apply the ToNumber() conversion operator to <var title="">timeout</var>, and let <var title="">timeout</var> be the
-   result.</li>
+   <li><p>Apply the ToNumber() abstract operation to <var title="">timeout</var>, and let <var title="">timeout</var> be the
+   result. <a href=#refsECMA262>[ECMA262]</a></li>
 
    <li><p>If <var title="">timeout</var> is an Infinity value, a
    Not-a-Number (NaN) value, or negative, let <var title="">timeout</var> be zero.</li>
@@ -86472,7 +86517,7 @@
 
    <dt id=refsECMA262>[ECMA262]</dt>
    <dd><cite><a href=http://www.ecma-international.org/publications/standards/Ecma-262.htm>ECMAScript
-   Language Specification</a></cite>. ECMA, December 1999.</dd>
+   Language Specification</a></cite>. ECMA, December 2009.</dd>
 
    <dt id=refsECMA357>[ECMA357]</dt>
    <dd>(Non-normative) <cite><a href=http://www.ecma-international.org/publications/standards/Ecma-357.htm>ECMAScript

Modified: index
===================================================================
--- index	2010-01-11 04:48:30 UTC (rev 4566)
+++ index	2010-01-11 06:47:44 UTC (rev 4567)
@@ -35554,7 +35554,7 @@
   attribute is specified and the attribute's value, when compiled as a
   JavaScript regular expression with the <code title="">global</code>,
   <code title="">ignoreCase</code>, and <code title="">multiline</code> flags <em>disabled</em> (see ECMA262
-  Edition 3, sections 15.10.7.2 through 15.10.7.4), compiles
+  Edition 5, sections 15.10.7.2 through 15.10.7.4), compiles
   successfully but the resulting regular expression does not match the
   entirety of the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, then the element is
   <a href=#suffering-from-a-pattern-mismatch>suffering from a pattern mismatch</a>. <a href=#refsECMA262>[ECMA262]</a></p>
@@ -41533,13 +41533,13 @@
   </ul>
 
   <p>Where the above requirements say that a value is to be a string,
-  the user agent must apply the ToString() conversion operator to the
+  the user agent must apply the ToString() abstract operation to the
   value, assume that the value was indeed a string, and use the result
   in the rest of the algorithm as if it had that had been the value
   passed to the method. <a href="#refsECMA262">[ECMA262]</a></p>
 
   <p>Where the above requirements say that a value is to be a number,
-  the user agent must first apply the ToNumber() conversion operator
+  the user agent must first apply the ToNumber() abstract operation
   to the value, and then verify that the result is neither an Infinity
   value nor a Not-a-Number (NaN) value. If this result is indeed
   acceptable (i.e. finite), the user agent must use the result in the
@@ -41547,14 +41547,14 @@
   the method. <a href="#refsECMA262">[ECMA262]</a></p>
 
   <p>Where the above requirements say that a value is to be an
-  integer, the user agent must first apply the ToNumber() conversion
-  operator to the value, and then verify that the result is a finite
+  integer, the user agent must first apply the ToNumber() abstract
+  operation to the value, and then verify that the result is a finite
   integer. If so, the user agent must use the result in the rest of
   the algorithm as if it had that had been the value passed to the
   method. <a href="#refsECMA262">[ECMA262]</a></p>
 
   <p>Where the above requirements say that a value is to be a boolean,
-  the user agent must apply the ToBoolean() conversion operator to the
+  the user agent must apply the ToBoolean() abstract operation to the
   value, assume that the value was indeed a boolean, and use the
   result in the rest of the algorithm as if it had that had been the
   value passed to the method. <a href="#refsECMA262">[ECMA262]</a></p>
@@ -41644,7 +41644,7 @@
     steps.</p>
 
     <p>To check if a value is an integer, the user agent must first
-    apply the ToNumber() conversion operator to the value, and then
+    apply the ToNumber() abstract operation to the value, and then
     verify that the result is a finite integer. If so, the user agent
     must use the result in the rest of the algorithm as if it had that
     had been the value passed to the method. <a
@@ -50879,15 +50879,19 @@
     environment.</p>
 
     <p>If the <a href="#script's-global-object">script's global object</a> is a
-    <code><a href=#window>Window</a></code> object, then in JavaScript, the <code title="">this</code> keyword in the global scope must return the
-    <code><a href=#window>Window</a></code> object's <code><a href=#windowproxy>WindowProxy</a></code> object.</p>
+    <code><a href=#window>Window</a></code> object, then in JavaScript, the ThisBinding of
+    the global execution context for this script must be the
+    <code><a href=#window>Window</a></code> object's <code><a href=#windowproxy>WindowProxy</a></code> object,
+    rather than the global object. <a href=#refsECMA262>[ECMA262]</a></p>
 
     <p class=note>This is a <a href=#willful-violation>willful violation</a> of the
     JavaScript specification current at the time of writing
-    (ECMAScript edition 3). The JavaScript specification requires that
-    the <code title="">this</code> keyword in the global scope return
-    the global object, but this is not compatible with the security
-    design prevalent in implementations as specified herein. <a href=#refsECMA262>[ECMA262]</a></p>
+    (ECMAScript edition 5, as defined in section 10.4.1.1 Initial
+    Global Execution Context, step 3). The JavaScript specification
+    requires that the <code title="">this</code> keyword in the global
+    scope return the global object, but this is not compatible with
+    the security design prevalent in implementations as specified
+    herein. <a href=#refsECMA262>[ECMA262]</a></p>
 
    </dd>
 
@@ -51495,43 +51499,67 @@
   <div class=impl>
 
   <!-- SCRIPT EXEC -->
-  <p>When an event handler content attribute is set, if the element is
-  owned by a <code>Document</code> that is in a <a href=#browsing-context>browsing
-  context</a>, and <a href=#concept-bc-script title=concept-bc-script>scripting is
-  enabled</a> for that <a href=#browsing-context>browsing context</a>, the user
-  agent must run the following steps to create a <a href=#concept-script title=concept-script>script</a> after setting the content
-  attribute to its new value:</p>
+  <p>When an <span>event handler content attribute</span> is set, if
+  the element is owned by a <code>Document</code> that is in a
+  <a href=#browsing-context>browsing context</a>, and <a href=#concept-bc-script title=concept-bc-script>scripting is enabled</a> for that
+  <a href=#browsing-context>browsing context</a>, the user agent must run the following
+  steps to create a <a href=#concept-script title=concept-script>script</a> after
+  setting the content attribute to its new value:</p>
 
   <ol><li><p>Set up a <a href=#script-execution-environment>script execution environment</a> for
    JavaScript.</li>
 
    <li>
 
-    <p>Using this script execution environment, interpret the
-    attribute's new value as the body of an anonymous function, with
-    the function's arguments set as follows:</p>
+    <p>Using this script execution environment, create a function
+    object (as defined in ECMAScript edition 5 section 13.2 Creating
+    Function Objects), with:</p>
 
-    <dl class=switch><dt>If the attribute is the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> attribute of the
-     <code><a href=#window>Window</a></code> object</dt>
+    <dl><dt>Parameter list <var title="">FormalParameterList</var></dt>
 
-     <dd>Let the function have three arguments, named <code title="">event</code>, <code title="">source</code>, and <code title="">fileno</code>.</dd>
+     <dd>
 
-     <dt>Otherwise</dt>
+      <dl class=switch><dt>If the attribute is the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> attribute of the
+       <code><a href=#window>Window</a></code> object</dt>
 
-     <dd>Let the function have a single argument called <code title="">event</code>.</dd>
+       <dd>Let the function have three arguments, named <code title="">event</code>, <code title="">source</code>, and <code title="">fileno</code>.</dd>
 
-    </dl><p>Link the new function's scope chain from the activation object
-    of the handler, to the element's object, to the element's
-    <a href=#form-owner>form owner</a>, if it has one, to the element's
-    <code>Document</code> object, to the <code><a href=#window>Window</a></code> object of
-    that <code>Document</code>. Set the function's <code>this</code>
-    parameter to the <code>Element</code> object representing the
-    element. Let this function be the only entry in the script's
+       <dt>Otherwise</dt>
+
+       <dd>Let the function have a single argument called <code title="">event</code>.</dd>
+
+      </dl></dd>
+
+     <dt>Function body <var title="">FunctionBody</var></dt>
+
+     <dd>The <span>event handler content attribute</span>'s new value.</dd>
+
+     <dt>Lexical Environment <var title="">Scope</var></dt>
+
+     <dd>
+
+      <ol><li>Let <var title="">Scope</var> be the result of
+       NewObjectEnvironment(the element's <code>Document</code>, the
+       <var title="">global environment</var>).</li>
+
+       <li>If the element has a <a href=#form-owner>form owner</a>, let <var title="">Scope</var> be the result of NewObjectEnvironment(the
+       element's <a href=#form-owner>form owner</a>, <var title="">Scope</var>).</li>
+
+       <li>Let <var title="">Scope</var> be the result of
+       NewObjectEnvironment(the element's object, <var title="">Scope</var>).</li>
+
+      </ol><p class=note>NewObjectEnvironment() is defined in ECMAScript
+      edition 5 section 10.2.2.3 NewObjectEnvironment (O, E). <a href=#refsECMA262>[ECMA262]</a></p>
+
+     </dd>
+
+     <dt>Boolean flag <var title="">Strict</var></dt>
+
+     <dd>False.</dd>
+
+    </dl><p>Let this new function be the only entry in the script's
     <a href=#list-of-code-entry-points>list of code entry-points</a>.</p>
 
-    <p class=note>See ECMA262 Edition 3, sections 10.1.6 and 10.2.3,
-    for more details on activation objects. <a href=#refsECMA262>[ECMA262]</a></p>
-
    </li>
 
    <li><p>If the previous steps failed to compile the script, then set
@@ -51641,6 +51669,23 @@
   <p class=note>In JavaScript, any <code title="">Function</code>
   object implements this interface.</p>
 
+  <p>If the <code><a href=#function>Function</a></code> object is a JavaScript <code title="">Function</code>, then when it is invoked by the user agent,
+  the user agent must set the <var title="">thisArg</var> (as defined
+  by ECMAScript edition 5 section 10.4.3 Entering Function Code) to
+  the <a href=#event-handlers title="event handlers">event handler</a>'s object. <a href=#refsECMA262>[ECMA262]</a></p>
+
+  <div class=example>
+
+   <p>For example, the following document fragment:</p>
+
+   <pre><body onload="alert(this)" onclick="alert(this)"></pre>
+
+   <p>...leads to an alert saying "<code title="">[object Window]</code>" when the document is loaded,
+   and an alert saying "<code title="">[object HTMLBodyElement]</code>" whenever the user
+   clicks something in the page.</p>
+
+  </div>
+
   <p>The return value of the function is affects whether the event is
   canceled or not: <span class=impl>as described above,</span> if
   the return value is false, the event is canceled (except for <code class=event-mouseover>mouseover</code> events, where the return
@@ -52107,9 +52152,9 @@
 
    </li>
 
-   <li><p>Apply the ToString() conversion operator to the first
+   <li><p>Apply the ToString() abstract operation to the first
    argument to the method, and let <var title="">script source</var>
-   be the result.</li>
+   be the result. <a href=#refsECMA262>[ECMA262]</a></li>
 
    <li><p>Let <var title="">script language</var> be
    JavaScript.</li>
@@ -52156,11 +52201,11 @@
   <ol><li><p>Let <var title="">timeout</var> be the second argument to
    the method, or zero if the argument was omitted.</li>
 
-   <li><p>Apply the ToString() conversion operator to <var title="">timeout</var>, and let <var title="">timeout</var>
-   be the result.</li>
+   <li><p>Apply the ToString() abstract operation to <var title="">timeout</var>, and let <var title="">timeout</var>
+   be the result. <a href=#refsECMA262>[ECMA262]</a></li>
 
-   <li><p>Apply the ToNumber() conversion operator to <var title="">timeout</var>, and let <var title="">timeout</var> be the
-   result.</li>
+   <li><p>Apply the ToNumber() abstract operation to <var title="">timeout</var>, and let <var title="">timeout</var> be the
+   result. <a href=#refsECMA262>[ECMA262]</a></li>
 
    <li><p>If <var title="">timeout</var> is an Infinity value, a
    Not-a-Number (NaN) value, or negative, let <var title="">timeout</var> be zero.</li>
@@ -80932,7 +80977,7 @@
 
    <dt id=refsECMA262>[ECMA262]</dt>
    <dd><cite><a href=http://www.ecma-international.org/publications/standards/Ecma-262.htm>ECMAScript
-   Language Specification</a></cite>. ECMA, December 1999.</dd>
+   Language Specification</a></cite>. ECMA, December 2009.</dd>
 
    <dt id=refsECMA357>[ECMA357]</dt>
    <dd>(Non-normative) <cite><a href=http://www.ecma-international.org/publications/standards/Ecma-357.htm>ECMAScript

Modified: source
===================================================================
--- source	2010-01-11 04:48:30 UTC (rev 4566)
+++ source	2010-01-11 06:47:44 UTC (rev 4567)
@@ -39496,7 +39496,7 @@
   JavaScript regular expression with the <code title="">global</code>,
   <code title="">ignoreCase</code>, and <code
   title="">multiline</code> flags <em>disabled</em> (see ECMA262
-  Edition 3, sections 15.10.7.2 through 15.10.7.4), compiles
+  Edition 5, sections 15.10.7.2 through 15.10.7.4), compiles
   successfully but the resulting regular expression does not match the
   entirety of the element's <span
   title="concept-fe-value">value</span>, then the element is
@@ -46381,13 +46381,13 @@
   </ul>
 
   <p>Where the above requirements say that a value is to be a string,
-  the user agent must apply the ToString() conversion operator to the
+  the user agent must apply the ToString() abstract operation to the
   value, assume that the value was indeed a string, and use the result
   in the rest of the algorithm as if it had that had been the value
   passed to the method. <a href="#refsECMA262">[ECMA262]</a></p>
 
   <p>Where the above requirements say that a value is to be a number,
-  the user agent must first apply the ToNumber() conversion operator
+  the user agent must first apply the ToNumber() abstract operation
   to the value, and then verify that the result is neither an Infinity
   value nor a Not-a-Number (NaN) value. If this result is indeed
   acceptable (i.e. finite), the user agent must use the result in the
@@ -46395,14 +46395,14 @@
   the method. <a href="#refsECMA262">[ECMA262]</a></p>
 
   <p>Where the above requirements say that a value is to be an
-  integer, the user agent must first apply the ToNumber() conversion
-  operator to the value, and then verify that the result is a finite
+  integer, the user agent must first apply the ToNumber() abstract
+  operation to the value, and then verify that the result is a finite
   integer. If so, the user agent must use the result in the rest of
   the algorithm as if it had that had been the value passed to the
   method. <a href="#refsECMA262">[ECMA262]</a></p>
 
   <p>Where the above requirements say that a value is to be a boolean,
-  the user agent must apply the ToBoolean() conversion operator to the
+  the user agent must apply the ToBoolean() abstract operation to the
   value, assume that the value was indeed a boolean, and use the
   result in the rest of the algorithm as if it had that had been the
   value passed to the method. <a href="#refsECMA262">[ECMA262]</a></p>
@@ -46492,7 +46492,7 @@
     steps.</p>
 
     <p>To check if a value is an integer, the user agent must first
-    apply the ToNumber() conversion operator to the value, and then
+    apply the ToNumber() abstract operation to the value, and then
     verify that the result is a finite integer. If so, the user agent
     must use the result in the rest of the algorithm as if it had that
     had been the value passed to the method. <a
@@ -57429,17 +57429,20 @@
     environment.</p>
 
     <p>If the <span>script's global object</span> is a
-    <code>Window</code> object, then in JavaScript, the <code
-    title="">this</code> keyword in the global scope must return the
-    <code>Window</code> object's <code>WindowProxy</code> object.</p>
+    <code>Window</code> object, then in JavaScript, the ThisBinding of
+    the global execution context for this script must be the
+    <code>Window</code> object's <code>WindowProxy</code> object,
+    rather than the global object. <a
+    href="#refsECMA262">[ECMA262]</a></p>
 
     <p class="note">This is a <span>willful violation</span> of the
     JavaScript specification current at the time of writing
-    (ECMAScript edition 3). The JavaScript specification requires that
-    the <code title="">this</code> keyword in the global scope return
-    the global object, but this is not compatible with the security
-    design prevalent in implementations as specified herein. <a
-    href="#refsECMA262">[ECMA262]</a></p>
+    (ECMAScript edition 5, as defined in section 10.4.1.1 Initial
+    Global Execution Context, step 3). The JavaScript specification
+    requires that the <code title="">this</code> keyword in the global
+    scope return the global object, but this is not compatible with
+    the security design prevalent in implementations as specified
+    herein. <a href="#refsECMA262">[ECMA262]</a></p>
 
    </dd>
 
@@ -58142,13 +58145,13 @@
   <div class="impl">
 
   <!-- SCRIPT EXEC -->
-  <p>When an event handler content attribute is set, if the element is
-  owned by a <code>Document</code> that is in a <span>browsing
-  context</span>, and <span title="concept-bc-script">scripting is
-  enabled</span> for that <span>browsing context</span>, the user
-  agent must run the following steps to create a <span
-  title="concept-script">script</span> after setting the content
-  attribute to its new value:</p>
+  <p>When an <span>event handler content attribute</span> is set, if
+  the element is owned by a <code>Document</code> that is in a
+  <span>browsing context</span>, and <span
+  title="concept-bc-script">scripting is enabled</span> for that
+  <span>browsing context</span>, the user agent must run the following
+  steps to create a <span title="concept-script">script</span> after
+  setting the content attribute to its new value:</p>
 
   <ol>
 
@@ -58157,40 +58160,75 @@
 
    <li>
 
-    <p>Using this script execution environment, interpret the
-    attribute's new value as the body of an anonymous function, with
-    the function's arguments set as follows:</p>
+    <p>Using this script execution environment, create a function
+    object (as defined in ECMAScript edition 5 section 13.2 Creating
+    Function Objects), with:</p>
 
-    <dl class="switch">
+    <dl>
 
-     <dt>If the attribute is the <code
-     title="handler-window-onerror">onerror</code> attribute of the
-     <code>Window</code> object</dt>
+     <dt>Parameter list <var title="">FormalParameterList</var></dt>
 
-     <dd>Let the function have three arguments, named <code
-     title="">event</code>, <code title="">source</code>, and <code
-     title="">fileno</code>.</dd>
+     <dd>
 
-     <dt>Otherwise</dt>
+      <dl class="switch">
 
-     <dd>Let the function have a single argument called <code
-     title="">event</code>.</dd>
+       <dt>If the attribute is the <code
+       title="handler-window-onerror">onerror</code> attribute of the
+       <code>Window</code> object</dt>
 
+       <dd>Let the function have three arguments, named <code
+       title="">event</code>, <code title="">source</code>, and <code
+       title="">fileno</code>.</dd>
+
+       <dt>Otherwise</dt>
+
+       <dd>Let the function have a single argument called <code
+       title="">event</code>.</dd>
+
+      </dl>
+
+     </dd>
+
+     <dt>Function body <var title="">FunctionBody</var></dt>
+
+     <dd>The <span>event handler content attribute</span>'s new value.</dd>
+
+     <dt>Lexical Environment <var title="">Scope</var></dt>
+
+     <dd>
+
+      <ol>
+
+       <li>Let <var title="">Scope</var> be the result of
+       NewObjectEnvironment(the element's <code>Document</code>, the
+       <var title="">global environment</var>).</li>
+
+       <li>If the element has a <span>form owner</span>, let <var
+       title="">Scope</var> be the result of NewObjectEnvironment(the
+       element's <span>form owner</span>, <var
+       title="">Scope</var>).</li>
+
+       <li>Let <var title="">Scope</var> be the result of
+       NewObjectEnvironment(the element's object, <var
+       title="">Scope</var>).</li>
+
+      </ol>
+
+      <p class="note">NewObjectEnvironment() is defined in ECMAScript
+      edition 5 section 10.2.2.3 NewObjectEnvironment (O, E). <a
+      href="#refsECMA262">[ECMA262]</a></p>
+
+     </dd>
+
+     <dt>Boolean flag <var title="">Strict</var></dt>
+
+     <dd>False.</dd>
+
     </dl>
 
-    <p>Link the new function's scope chain from the activation object
-    of the handler, to the element's object, to the element's
-    <span>form owner</span>, if it has one, to the element's
-    <code>Document</code> object, to the <code>Window</code> object of
-    that <code>Document</code>. Set the function's <code>this</code>
-    parameter to the <code>Element</code> object representing the
-    element. Let this function be the only entry in the script's
+    <p>Let this new function be the only entry in the script's
     <span>list of code entry-points</span>.</p>
 
-    <p class="note">See ECMA262 Edition 3, sections 10.1.6 and 10.2.3,
-    for more details on activation objects. <a
-    href="#refsECMA262">[ECMA262]</a></p>
-
    </li>
 
    <li><p>If the previous steps failed to compile the script, then set
@@ -58318,6 +58356,27 @@
   <p class="note">In JavaScript, any <code title="">Function</code>
   object implements this interface.</p>
 
+  <p>If the <code>Function</code> object is a JavaScript <code
+  title="">Function</code>, then when it is invoked by the user agent,
+  the user agent must set the <var title="">thisArg</var> (as defined
+  by ECMAScript edition 5 section 10.4.3 Entering Function Code) to
+  the <span title="event handlers">event handler</span>'s object. <a
+  href="#refsECMA262">[ECMA262]</a></p>
+
+  <div class="example">
+
+   <p>For example, the following document fragment:</p>
+
+   <pre><body onload="alert(this)" onclick="alert(this)"></pre>
+
+   <p>...leads to an alert saying "<code
+   title="">[object Window]</code>" when the document is loaded,
+   and an alert saying "<code
+   title="">[object HTMLBodyElement]</code>" whenever the user
+   clicks something in the page.</p>
+
+  </div>
+
   <p>The return value of the function is affects whether the event is
   canceled or not: <span class="impl">as described above,</span> if
   the return value is false, the event is canceled (except for <code
@@ -58875,9 +58934,9 @@
 
    </li>
 
-   <li><p>Apply the ToString() conversion operator to the first
+   <li><p>Apply the ToString() abstract operation to the first
    argument to the method, and let <var title="">script source</var>
-   be the result.</p></li>
+   be the result. <a href="#refsECMA262">[ECMA262]</a></p></li>
 
    <li><p>Let <var title="">script language</var> be
    JavaScript.</p></li>
@@ -58939,13 +58998,13 @@
    <li><p>Let <var title="">timeout</var> be the second argument to
    the method, or zero if the argument was omitted.</p></li>
 
-   <li><p>Apply the ToString() conversion operator to <var
+   <li><p>Apply the ToString() abstract operation to <var
    title="">timeout</var>, and let <var title="">timeout</var>
-   be the result.</p></li>
+   be the result. <a href="#refsECMA262">[ECMA262]</a></p></li>
 
-   <li><p>Apply the ToNumber() conversion operator to <var
+   <li><p>Apply the ToNumber() abstract operation to <var
    title="">timeout</var>, and let <var title="">timeout</var> be the
-   result.</p></li>
+   result. <a href="#refsECMA262">[ECMA262]</a></p></li>
 
    <li><p>If <var title="">timeout</var> is an Infinity value, a
    Not-a-Number (NaN) value, or negative, let <var
@@ -67514,8 +67573,8 @@
   <p>User agents must implement the SQL dialect supported by Sqlite 3.6.19.</p>
 
   <p>When converting bound arguments to SQL data types, the JavaScript
-  ToPrimitive operator must be applied to obtain the raw value to be
-  processed. <a href="#refsECMA262">[ECMA262]</a>.</p>
+  ToPrimitive abstract operation must be applied to obtain the raw
+  value to be processed. <a href="#refsECMA262">[ECMA262]</a>.</p>
 
   <!--END database-->
 
@@ -96728,7 +96787,7 @@
    <dt id="refsECMA262">[ECMA262]</dt>
    <dd><cite><a
    href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript
-   Language Specification</a></cite>. ECMA, December 1999.</dd>
+   Language Specification</a></cite>. ECMA, December 2009.</dd>
 
    <dt id="refsECMA357">[ECMA357]</dt>
    <dd>(Non-normative) <cite><a




More information about the Commit-Watchers mailing list