- From: poot <cvsmail@w3.org>
- Date: Mon, 11 Jan 2010 15:48:11 +0900 (JST)
- To: public-html-diffs@w3.org
hixie: Update references from ES3 to ES5. (whatwg r4567)
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.3646&r2=1.3647&f=h
http://html5.org/tools/web-apps-tracker?from=4566&to=4567
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.3646
retrieving revision 1.3647
diff -u -d -r1.3646 -r1.3647
--- Overview.html 11 Jan 2010 04:48:37 -0000 1.3646
+++ Overview.html 11 Jan 2010 06:47:52 -0000 1.3647
@@ -28713,7 +28713,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>
@@ -34153,13 +34153,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
@@ -34167,14 +34167,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>
@@ -34264,7 +34264,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
@@ -38979,15 +38979,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>
@@ -39552,42 +39556,66 @@
contain valid JavaScript code matching the <code title="">FunctionBody</code> production. <a href="#refsECMA262">[ECMA262]</a><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
- <a href="#list-of-code-entry-points">list of code entry-points</a>.</p>
+ <dt>Otherwise</dt>
- <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>
+ <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>
</li>
@@ -39676,7 +39704,20 @@
any <a href="#dom-function-call" title="dom-function-call">call</a>(in any... arguments);
};</pre><p>The <dfn id="dom-function-call" title="dom-function-call"><code>call(...)</code></dfn>
method is the object's callback.<p class="note">In JavaScript, any <code title="">Function</code>
- object implements this interface.<p>The return value of the function is affects whether the event is
+ object implements this interface.<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><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
value has to be true to cancel the event). With <code title="event-beforeunload">beforeunload</code> events, the value is
@@ -40119,9 +40160,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>
@@ -40168,11 +40209,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>
@@ -66473,7 +66514,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
Received on Monday, 11 January 2010 06:48:40 UTC