[html5] r8124 - [e] (0) Rejigger how scripts are described. Work in progress. Fixing https://www [...]
whatwg at whatwg.org
whatwg at whatwg.org
Fri Aug 2 14:48:04 PDT 2013
Author: ianh
Date: 2013-08-02 14:48:03 -0700 (Fri, 02 Aug 2013)
New Revision: 8124
Modified:
complete.html
index
source
Log:
[e] (0) Rejigger how scripts are described. Work in progress.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=22863
Affected topics: HTML, Workers
Modified: complete.html
===================================================================
--- complete.html 2013-08-02 20:34:31 UTC (rev 8123)
+++ complete.html 2013-08-02 21:48:03 UTC (rev 8124)
@@ -71259,38 +71259,61 @@
<hr><p>A <dfn id=concept-script title=concept-script>script</dfn> has:</p>
- <dl><dt>A <dfn id=script-execution-environment>script execution environment</dfn></dt>
+ <dl><dt>A <dfn id=code-entry-point>code entry-point</dfn></dt>
<dd>
- <p>The characteristics of the script execution environment depend on the language, and are not
- defined by this specification.</p>
+ <p>A code entry-point represents a block of executable code that the script exposes to other
+ scripts and to the user agent. Typically, the code corresponding to the code entry-point is
+ executed immediately after the script is parsed, but for event handlers, it is called each time
+ the handler is invoked.</p>
- <p class=example>In JavaScript, the script execution environment consists of the interpreter,
- the stack of <i>execution contexts</i>, the <i>global code</i> and <i>function code</i> and the
- <code>Function</code> objects resulting, and so forth.</p>
+ <p class=example>In JavaScript <code><a href=#the-script-element>script</a></code> blocks, this corresponds to the execution
+ context of the global code.</p>
</dd>
- <dt>A <dfn id=list-of-code-entry-points>list of code entry-points</dfn></dt>
+ <dt>Optionally, a <dfn id=muted-errors>muted errors</dfn> flag</dt>
<dd>
- <p>Each code entry-point represents a block of executable code that the script exposes to other
- scripts and to the user agent.</p>
+ <p>A flag which, if set, means that error information will not be provided for errors in this
+ script (used to mute errors for cross-origin scripts, since that can leak private
+ information).</p>
- <p class=example>Each <code>Function</code> object in a JavaScript <a href=#script-execution-environment>script execution
- environment</a> has a corresponding code entry-point, for instance.</p>
+ </dd>
+<!--
+ <dt>A relationship with a <span>script settings object</span></dt>
- <p>The main program code of the script, if any, is the <dfn id=initial-code-entry-point><i>initial code
- entry-point</i></dfn>. Typically, the code corresponding to this entry-point is executed
- immediately after the script is parsed.</p>
+ <dd>
- <p class=example>In JavaScript, this corresponds to the execution context of the global
- code.</p>
+ <p>An object (defined below) that describes various settings that can be shared with other
+ scripts.</p>
</dd>
+ </dl>
+
+ <hr>
+
+ <p>Each global object has a <dfn>script settings object</dfn> shared by the scripts that use that
+ global object. A <span>script settings object</span> consists of the following:</p>
+
+ <dl>
+-->
+ <dt>A <dfn id=script-execution-environment>script execution environment</dfn></dt>
+
+ <dd>
+
+ <p>The characteristics of the script execution environment depend on the language, and are not
+ defined by this specification.</p>
+
+ <p class=example>In JavaScript, the script execution environment consists of the interpreter,
+ the stack of <i>execution contexts</i>, the <i>global code</i> and <i>function code</i> and the
+ <code>Function</code> objects resulting, and so forth.</p>
+
+ </dd>
+
<dt>A relationship with the <dfn id="script's-global-object">script's global object</dfn></dt>
<dd>
@@ -71371,16 +71394,6 @@
</dd>
- <dt>Optionally, a <dfn id=muted-errors>muted errors</dfn> flag</dt>
-
- <dd>
-
- <p>A flag which, if set, means that error information will not be provided for errors in this
- script (used to mute errors for cross-origin scripts, since that can leak private
- information).</p>
-
- </dd>
-
</dl></div>
@@ -71409,8 +71422,7 @@
script</a>.</li>
<li><p>Make the <a href=#script-execution-environment title="script execution environment">script execution environment</a>
- for the <a href=#concept-script title=concept-script>script</a> execute the code for the given code
- entry-point.</li>
+ for the <a href=#concept-script title=concept-script>script</a> execute the <a href=#concept-script title=concept-script>script</a>'s <a href=#code-entry-point>code entry-point</a>.</li>
<li><p>Pop the <a href=#concept-script title=concept-script>script</a> being invoked from the <a href=#stack-of-incumbent-scripts>stack of
incumbent scripts</a>.</li>
@@ -71473,21 +71485,20 @@
character encoding, a base URL, and optionally a <var title="">muted errors</var> flag, the user
agent must run the following steps:</p>
- <ol><li><p>If <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is
+ <ol><!--CLEANUP--><li><p>Let <var title="">script</var> be a new <a href=#concept-script title=concept-script>script</a> that
+ this algorithm will subsequently initialize.</li>
+
+ <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
- algorithm, then abort these steps, as if the script did nothing but
+ algorithm, then abort these steps, as if the script source described a program that did nothing but
return void.</p>
<li><p>Set up a <a href=#script-execution-environment>script execution environment</a> as
- appropriate for the scripting language.</li>
+ appropriate for the given scripting language.</li>
<li><p>Parse/compile/initialize the source of the script using the
<a href=#script-execution-environment>script execution environment</a>, as appropriate for the
- scripting language, and thus obtain the <a href=#list-of-code-entry-points>list of code
- entry-points</a> for the script. If the semantics of the
- scripting language and the given source code are such that there is
- executable code to be immediately run, then the <i><a href=#initial-code-entry-point>initial code
- entry-point</a></i> is the entry-point for that code.</li>
+ scripting language, and thus obtain <var title="">script</var>'s <a href=#code-entry-point>code entry-point</a>.</li>
<li><p>Set up the <a href="#script's-global-object">script's global object</a>, the
<a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-document">script's
@@ -71496,18 +71507,18 @@
<a href="#script's-base-url">script's base URL</a> from the settings passed to this
algorithm.</li>
- <li><p>If the <var title="">muted errors</var> flag was set, then set the script's <a href=#muted-errors>muted
- errors</a> flag also.</li>
+ <li><p>If the <var title="">muted errors</var> flag was set, then set <var title="">script</var>'s <a href=#muted-errors>muted
+ errors</a> flag.</li>
<li>
<p>If all the steps above succeeded (in particular, if the script
was compiled successfully), <a href=#jump-to-a-code-entry-point title="jump to a code
- 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>
+ entry-point">Jump</a> to <var title="">script</var>'s <a href=#code-entry-point>code
+ entry-point</a>.</p>
- <p>Otherwise, <a href=#report-the-error>report the error</a> for the <a href=#concept-script title=concept-script>script</a>,
- with the problematic position (line number and column number), using <a href="#script's-global-object">script's global object</a> as the target. If the
+ <p>Otherwise, <a href=#report-the-error>report the error</a> for <var title="">script</var>,
+ with the problematic position (line number and column number), using the <a href="#script's-global-object">script's global object</a> as the target. 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>
@@ -72070,7 +72081,7 @@
script 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>
+ <p>Let <var title="">result</var> be the return value of the <a href=#code-entry-point>code entry-point</a>
of this <a href=#concept-script title=concept-script>script</a>. If an exception was thrown, let <var title="">result</var> be void instead. (The result will be void also if <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a>.)</p>
<p>When it comes time to <a href="#set-the-document's-address">set the document's address</a> in the <a href=#navigate title=navigate>navigation algorithm</a>, use <var title="">address</var> as the
@@ -72091,7 +72102,7 @@
scripting language set to JavaScript, and with the <code>Document</code>'s object's
<span>browsing context</span> as the browsing context.</p>
- <p>Let <var title="">result</var> be the return value of the <i>initial code entry-point</i>
+ <p>Let <var title="">result</var> be the return value of the <span>code entry-point</span>
of this <span title="concept-script">script</span>. If an exception was thrown, let <var
title="">result</var> be void instead. (The result will be void also if <span
title="concept-bc-noscript">scripting is disabled</span>.)</p>
@@ -72309,8 +72320,7 @@
<dd>The value of <var title="">strict</var>.</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>
+ </dl><p>Let this new function be the script's <a href=#code-entry-point>code entry-point</a>.</p>
</li>
@@ -72421,7 +72431,7 @@
<dd>
- <p>Invoke <var title="">callback</var> with five arguments,
+ <p><a href=#concept-invoke-event-handler title=concept-invoke-event-handler>Invoke</a> <var title="">callback</var> with five arguments,
the first one having the value of <var title="">E</var>'s <code title=dom-ErrorEvent-message><a href=#dom-errorevent-message>message</a></code> attribute,
the second having the value of <var title="">E</var>'s <code title=dom-ErrorEvent-filename><a href=#dom-errorevent-filename>filename</a></code> attribute,
the third having the value of <var title="">E</var>'s <code title=dom-ErrorEvent-lineno><a href=#dom-errorevent-lineno>lineno</a></code> attribute,
@@ -72436,13 +72446,16 @@
<dd>
- <p>Invoke <var title="">callback</var> with one argument, the value of which is the
+ <p><a href=#concept-invoke-event-handler title=concept-invoke-event-handler>Invoke</a> <var title="">callback</var> with one argument, the value of which is the
<code><a href=#event>Event</a></code> object <var title="">E</var>, with the <i title=dfn-callback-this-value>callback this value</i> set to <var title="">E</var>'s <code title=dom-Event-currentTarget>currentTarget</code>. Let <var title="">return value</var> be the callback's return value. <a href=#refsWEBIDL>[WEBIDL]</a></p>
</dd>
- </dl></li>
+ </dl><p>In this step, <dfn id=concept-invoke-event-handler title=concept-invoke-event-handler>invoke</dfn> means to run the
+ <a href=#jump-to-a-code-entry-point>jump to a code entry-point</a> alorithm.</p>
+ </li>
+
<li>
<p>Process <var title="">return value</var> as follows:</p>
@@ -80386,7 +80399,7 @@
environment</a>. (In either case, by definition, it is a <a href=#worker-environment>worker
environment</a>.)</li>
- <li>
+ <li><!-- SCRIPT EXEC -->
<p>A new <a href=#concept-script title=concept-script>script</a> is now created, as follows.</p>
@@ -80395,8 +80408,7 @@
<p>Parse/compile/initialize <var title="">source</var> using that <a href=#script-execution-environment>script execution
environment</a>, as appropriate for <var title="">language</var>, and thus obtain a
- <a href=#list-of-code-entry-points>list of code entry-points</a>; set the <i><a href=#initial-code-entry-point>initial code entry-point</a></i> to the
- entry-point for any executable code to be immediately run.</p>
+ <a href=#code-entry-point>code entry-point</a>.</p>
<p>Set the <a href="#script's-global-object">script's global object</a> to <var title="">worker global scope</var>.</p>
@@ -80437,7 +80449,7 @@
<li>
- <p><a href=#jump-to-a-code-entry-point title="jump to a code 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>, and let that run until
+ <p><a href=#jump-to-a-code-entry-point title="jump to a code entry-point">Jump</a> to the <a href=#concept-script title=concept-script>script</a>'s <a href=#code-entry-point>code entry-point</a>, and let that run until
it either returns, fails to catch an exception, or gets prematurely aborted by the "<a href=#kill-a-worker>kill a
worker</a>" or "<a href=#terminate-a-worker>terminate a worker</a>" algorithms defined below.</p>
Modified: index
===================================================================
--- index 2013-08-02 20:34:31 UTC (rev 8123)
+++ index 2013-08-02 21:48:03 UTC (rev 8124)
@@ -71259,38 +71259,61 @@
<hr><p>A <dfn id=concept-script title=concept-script>script</dfn> has:</p>
- <dl><dt>A <dfn id=script-execution-environment>script execution environment</dfn></dt>
+ <dl><dt>A <dfn id=code-entry-point>code entry-point</dfn></dt>
<dd>
- <p>The characteristics of the script execution environment depend on the language, and are not
- defined by this specification.</p>
+ <p>A code entry-point represents a block of executable code that the script exposes to other
+ scripts and to the user agent. Typically, the code corresponding to the code entry-point is
+ executed immediately after the script is parsed, but for event handlers, it is called each time
+ the handler is invoked.</p>
- <p class=example>In JavaScript, the script execution environment consists of the interpreter,
- the stack of <i>execution contexts</i>, the <i>global code</i> and <i>function code</i> and the
- <code>Function</code> objects resulting, and so forth.</p>
+ <p class=example>In JavaScript <code><a href=#the-script-element>script</a></code> blocks, this corresponds to the execution
+ context of the global code.</p>
</dd>
- <dt>A <dfn id=list-of-code-entry-points>list of code entry-points</dfn></dt>
+ <dt>Optionally, a <dfn id=muted-errors>muted errors</dfn> flag</dt>
<dd>
- <p>Each code entry-point represents a block of executable code that the script exposes to other
- scripts and to the user agent.</p>
+ <p>A flag which, if set, means that error information will not be provided for errors in this
+ script (used to mute errors for cross-origin scripts, since that can leak private
+ information).</p>
- <p class=example>Each <code>Function</code> object in a JavaScript <a href=#script-execution-environment>script execution
- environment</a> has a corresponding code entry-point, for instance.</p>
+ </dd>
+<!--
+ <dt>A relationship with a <span>script settings object</span></dt>
- <p>The main program code of the script, if any, is the <dfn id=initial-code-entry-point><i>initial code
- entry-point</i></dfn>. Typically, the code corresponding to this entry-point is executed
- immediately after the script is parsed.</p>
+ <dd>
- <p class=example>In JavaScript, this corresponds to the execution context of the global
- code.</p>
+ <p>An object (defined below) that describes various settings that can be shared with other
+ scripts.</p>
</dd>
+ </dl>
+
+ <hr>
+
+ <p>Each global object has a <dfn>script settings object</dfn> shared by the scripts that use that
+ global object. A <span>script settings object</span> consists of the following:</p>
+
+ <dl>
+-->
+ <dt>A <dfn id=script-execution-environment>script execution environment</dfn></dt>
+
+ <dd>
+
+ <p>The characteristics of the script execution environment depend on the language, and are not
+ defined by this specification.</p>
+
+ <p class=example>In JavaScript, the script execution environment consists of the interpreter,
+ the stack of <i>execution contexts</i>, the <i>global code</i> and <i>function code</i> and the
+ <code>Function</code> objects resulting, and so forth.</p>
+
+ </dd>
+
<dt>A relationship with the <dfn id="script's-global-object">script's global object</dfn></dt>
<dd>
@@ -71371,16 +71394,6 @@
</dd>
- <dt>Optionally, a <dfn id=muted-errors>muted errors</dfn> flag</dt>
-
- <dd>
-
- <p>A flag which, if set, means that error information will not be provided for errors in this
- script (used to mute errors for cross-origin scripts, since that can leak private
- information).</p>
-
- </dd>
-
</dl></div>
@@ -71409,8 +71422,7 @@
script</a>.</li>
<li><p>Make the <a href=#script-execution-environment title="script execution environment">script execution environment</a>
- for the <a href=#concept-script title=concept-script>script</a> execute the code for the given code
- entry-point.</li>
+ for the <a href=#concept-script title=concept-script>script</a> execute the <a href=#concept-script title=concept-script>script</a>'s <a href=#code-entry-point>code entry-point</a>.</li>
<li><p>Pop the <a href=#concept-script title=concept-script>script</a> being invoked from the <a href=#stack-of-incumbent-scripts>stack of
incumbent scripts</a>.</li>
@@ -71473,21 +71485,20 @@
character encoding, a base URL, and optionally a <var title="">muted errors</var> flag, the user
agent must run the following steps:</p>
- <ol><li><p>If <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is
+ <ol><!--CLEANUP--><li><p>Let <var title="">script</var> be a new <a href=#concept-script title=concept-script>script</a> that
+ this algorithm will subsequently initialize.</li>
+
+ <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
- algorithm, then abort these steps, as if the script did nothing but
+ algorithm, then abort these steps, as if the script source described a program that did nothing but
return void.</p>
<li><p>Set up a <a href=#script-execution-environment>script execution environment</a> as
- appropriate for the scripting language.</li>
+ appropriate for the given scripting language.</li>
<li><p>Parse/compile/initialize the source of the script using the
<a href=#script-execution-environment>script execution environment</a>, as appropriate for the
- scripting language, and thus obtain the <a href=#list-of-code-entry-points>list of code
- entry-points</a> for the script. If the semantics of the
- scripting language and the given source code are such that there is
- executable code to be immediately run, then the <i><a href=#initial-code-entry-point>initial code
- entry-point</a></i> is the entry-point for that code.</li>
+ scripting language, and thus obtain <var title="">script</var>'s <a href=#code-entry-point>code entry-point</a>.</li>
<li><p>Set up the <a href="#script's-global-object">script's global object</a>, the
<a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-document">script's
@@ -71496,18 +71507,18 @@
<a href="#script's-base-url">script's base URL</a> from the settings passed to this
algorithm.</li>
- <li><p>If the <var title="">muted errors</var> flag was set, then set the script's <a href=#muted-errors>muted
- errors</a> flag also.</li>
+ <li><p>If the <var title="">muted errors</var> flag was set, then set <var title="">script</var>'s <a href=#muted-errors>muted
+ errors</a> flag.</li>
<li>
<p>If all the steps above succeeded (in particular, if the script
was compiled successfully), <a href=#jump-to-a-code-entry-point title="jump to a code
- 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>
+ entry-point">Jump</a> to <var title="">script</var>'s <a href=#code-entry-point>code
+ entry-point</a>.</p>
- <p>Otherwise, <a href=#report-the-error>report the error</a> for the <a href=#concept-script title=concept-script>script</a>,
- with the problematic position (line number and column number), using <a href="#script's-global-object">script's global object</a> as the target. If the
+ <p>Otherwise, <a href=#report-the-error>report the error</a> for <var title="">script</var>,
+ with the problematic position (line number and column number), using the <a href="#script's-global-object">script's global object</a> as the target. 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>
@@ -72070,7 +72081,7 @@
script 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>
+ <p>Let <var title="">result</var> be the return value of the <a href=#code-entry-point>code entry-point</a>
of this <a href=#concept-script title=concept-script>script</a>. If an exception was thrown, let <var title="">result</var> be void instead. (The result will be void also if <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a>.)</p>
<p>When it comes time to <a href="#set-the-document's-address">set the document's address</a> in the <a href=#navigate title=navigate>navigation algorithm</a>, use <var title="">address</var> as the
@@ -72091,7 +72102,7 @@
scripting language set to JavaScript, and with the <code>Document</code>'s object's
<span>browsing context</span> as the browsing context.</p>
- <p>Let <var title="">result</var> be the return value of the <i>initial code entry-point</i>
+ <p>Let <var title="">result</var> be the return value of the <span>code entry-point</span>
of this <span title="concept-script">script</span>. If an exception was thrown, let <var
title="">result</var> be void instead. (The result will be void also if <span
title="concept-bc-noscript">scripting is disabled</span>.)</p>
@@ -72309,8 +72320,7 @@
<dd>The value of <var title="">strict</var>.</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>
+ </dl><p>Let this new function be the script's <a href=#code-entry-point>code entry-point</a>.</p>
</li>
@@ -72421,7 +72431,7 @@
<dd>
- <p>Invoke <var title="">callback</var> with five arguments,
+ <p><a href=#concept-invoke-event-handler title=concept-invoke-event-handler>Invoke</a> <var title="">callback</var> with five arguments,
the first one having the value of <var title="">E</var>'s <code title=dom-ErrorEvent-message><a href=#dom-errorevent-message>message</a></code> attribute,
the second having the value of <var title="">E</var>'s <code title=dom-ErrorEvent-filename><a href=#dom-errorevent-filename>filename</a></code> attribute,
the third having the value of <var title="">E</var>'s <code title=dom-ErrorEvent-lineno><a href=#dom-errorevent-lineno>lineno</a></code> attribute,
@@ -72436,13 +72446,16 @@
<dd>
- <p>Invoke <var title="">callback</var> with one argument, the value of which is the
+ <p><a href=#concept-invoke-event-handler title=concept-invoke-event-handler>Invoke</a> <var title="">callback</var> with one argument, the value of which is the
<code><a href=#event>Event</a></code> object <var title="">E</var>, with the <i title=dfn-callback-this-value>callback this value</i> set to <var title="">E</var>'s <code title=dom-Event-currentTarget>currentTarget</code>. Let <var title="">return value</var> be the callback's return value. <a href=#refsWEBIDL>[WEBIDL]</a></p>
</dd>
- </dl></li>
+ </dl><p>In this step, <dfn id=concept-invoke-event-handler title=concept-invoke-event-handler>invoke</dfn> means to run the
+ <a href=#jump-to-a-code-entry-point>jump to a code entry-point</a> alorithm.</p>
+ </li>
+
<li>
<p>Process <var title="">return value</var> as follows:</p>
@@ -80386,7 +80399,7 @@
environment</a>. (In either case, by definition, it is a <a href=#worker-environment>worker
environment</a>.)</li>
- <li>
+ <li><!-- SCRIPT EXEC -->
<p>A new <a href=#concept-script title=concept-script>script</a> is now created, as follows.</p>
@@ -80395,8 +80408,7 @@
<p>Parse/compile/initialize <var title="">source</var> using that <a href=#script-execution-environment>script execution
environment</a>, as appropriate for <var title="">language</var>, and thus obtain a
- <a href=#list-of-code-entry-points>list of code entry-points</a>; set the <i><a href=#initial-code-entry-point>initial code entry-point</a></i> to the
- entry-point for any executable code to be immediately run.</p>
+ <a href=#code-entry-point>code entry-point</a>.</p>
<p>Set the <a href="#script's-global-object">script's global object</a> to <var title="">worker global scope</var>.</p>
@@ -80437,7 +80449,7 @@
<li>
- <p><a href=#jump-to-a-code-entry-point title="jump to a code 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>, and let that run until
+ <p><a href=#jump-to-a-code-entry-point title="jump to a code entry-point">Jump</a> to the <a href=#concept-script title=concept-script>script</a>'s <a href=#code-entry-point>code entry-point</a>, and let that run until
it either returns, fails to catch an exception, or gets prematurely aborted by the "<a href=#kill-a-worker>kill a
worker</a>" or "<a href=#terminate-a-worker>terminate a worker</a>" algorithms defined below.</p>
Modified: source
===================================================================
--- source 2013-08-02 20:34:31 UTC (rev 8123)
+++ source 2013-08-02 21:48:03 UTC (rev 8124)
@@ -79671,38 +79671,61 @@
<dl>
- <dt>A <dfn>script execution environment</dfn></dt>
+ <dt>A <dfn>code entry-point</dfn></dt>
<dd>
- <p>The characteristics of the script execution environment depend on the language, and are not
- defined by this specification.</p>
+ <p>A code entry-point represents a block of executable code that the script exposes to other
+ scripts and to the user agent. Typically, the code corresponding to the code entry-point is
+ executed immediately after the script is parsed, but for event handlers, it is called each time
+ the handler is invoked.</p>
- <p class="example">In JavaScript, the script execution environment consists of the interpreter,
- the stack of <i>execution contexts</i>, the <i>global code</i> and <i>function code</i> and the
- <code>Function</code> objects resulting, and so forth.</p>
+ <p class="example">In JavaScript <code>script</code> blocks, this corresponds to the execution
+ context of the global code.</p>
</dd>
- <dt>A <dfn>list of code entry-points</dfn></dt>
+ <dt>Optionally, a <dfn>muted errors</dfn> flag</dt>
<dd>
- <p>Each code entry-point represents a block of executable code that the script exposes to other
- scripts and to the user agent.</p>
+ <p>A flag which, if set, means that error information will not be provided for errors in this
+ script (used to mute errors for cross-origin scripts, since that can leak private
+ information).</p>
- <p class="example">Each <code>Function</code> object in a JavaScript <span>script execution
- environment</span> has a corresponding code entry-point, for instance.</p>
+ </dd>
+<!--
+ <dt>A relationship with a <span>script settings object</span></dt>
- <p>The main program code of the script, if any, is the <dfn><i>initial code
- entry-point</i></dfn>. Typically, the code corresponding to this entry-point is executed
- immediately after the script is parsed.</p>
+ <dd>
- <p class="example">In JavaScript, this corresponds to the execution context of the global
- code.</p>
+ <p>An object (defined below) that describes various settings that can be shared with other
+ scripts.</p>
</dd>
+ </dl>
+
+ <hr>
+
+ <p>Each global object has a <dfn>script settings object</dfn> shared by the scripts that use that
+ global object. A <span>script settings object</span> consists of the following:</p>
+
+ <dl>
+-->
+ <dt>A <dfn>script execution environment</dfn></dt>
+
+ <dd>
+
+ <p>The characteristics of the script execution environment depend on the language, and are not
+ defined by this specification.</p>
+
+ <p class="example">In JavaScript, the script execution environment consists of the interpreter,
+ the stack of <i>execution contexts</i>, the <i>global code</i> and <i>function code</i> and the
+ <code>Function</code> objects resulting, and so forth.</p>
+
+ </dd>
+
<dt>A relationship with the <dfn>script's global object</dfn></dt>
<dd>
@@ -79790,16 +79813,6 @@
</dd>
- <dt>Optionally, a <dfn>muted errors</dfn> flag</dt>
-
- <dd>
-
- <p>A flag which, if set, means that error information will not be provided for errors in this
- script (used to mute errors for cross-origin scripts, since that can leak private
- information).</p>
-
- </dd>
-
</dl>
</div>
@@ -79833,8 +79846,8 @@
script</span>.</p></li>
<li><p>Make the <span title="script execution environment">script execution environment</span>
- for the <span title="concept-script">script</span> execute the code for the given code
- entry-point.</p></li>
+ for the <span title="concept-script">script</span> execute the <span
+ title="concept-script">script</span>'s <span>code entry-point</span>.</p></li>
<li><p>Pop the <span title="concept-script">script</span> being invoked from the <span>stack of
incumbent scripts</span>.</p></li>
@@ -79906,22 +79919,22 @@
agent must run the following steps:</p>
<ol>
+<!--CLEANUP-->
+ <li><p>Let <var title="">script</var> be a new <span title="concept-script">script</span> that
+ this algorithm will subsequently initialize.</p></li>
+
<li><p>If <span title="concept-bc-noscript">scripting is
disabled</span> for <span>browsing context</span> passed to this
- algorithm, then abort these steps, as if the script did nothing but
+ algorithm, then abort these steps, as if the script source described a program that did nothing but
return void.</p>
<li><p>Set up a <span>script execution environment</span> as
- appropriate for the scripting language.</p></li>
+ appropriate for the given scripting language.</p></li>
<li><p>Parse/compile/initialize the source of the script using the
<span>script execution environment</span>, as appropriate for the
- scripting language, and thus obtain the <span>list of code
- entry-points</span> for the script. If the semantics of the
- scripting language and the given source code are such that there is
- executable code to be immediately run, then the <i>initial code
- entry-point</i> is the entry-point for that code.</p></li>
+ scripting language, and thus obtain <var title="">script</var>'s <span>code entry-point</span>.</p></li>
<li><p>Set up the <span>script's global object</span>, the
<span>script's browsing context</span>, the <span>script's
@@ -79930,19 +79943,19 @@
<span>script's base URL</span> from the settings passed to this
algorithm.</p></li>
- <li><p>If the <var title="">muted errors</var> flag was set, then set the script's <span>muted
- errors</span> flag also.</p></li>
+ <li><p>If the <var title="">muted errors</var> flag was set, then set <var title="">script</var>'s <span>muted
+ errors</span> flag.</p></li>
<li>
<p>If all the steps above succeeded (in particular, if the script
was compiled successfully), <span title="jump to a code
- entry-point">Jump</span> to the <span
- title="concept-script">script</span>'s <i>initial code
- entry-point</i>.</p>
+ entry-point">Jump</span> to <var
+ title="">script</var>'s <span>code
+ entry-point</span>.</p>
- <p>Otherwise, <span>report the error</span> for the <span title="concept-script">script</span>,
- with the problematic position (line number and column number), using <span>script's global object</span> as the target. If the
+ <p>Otherwise, <span>report the error</span> for <var title="">script</var>,
+ with the problematic position (line number and column number), using the <span>script's global object</span> as the target. 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>
@@ -80623,7 +80636,7 @@
script 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>
+ <p>Let <var title="">result</var> be the return value of the <span>code entry-point</span>
of this <span title="concept-script">script</span>. If an exception was thrown, let <var
title="">result</var> be void instead. (The result will be void also if <span
title="concept-bc-noscript">scripting is disabled</span>.)</p>
@@ -80647,7 +80660,7 @@
scripting language set to JavaScript, and with the <code>Document</code>'s object's
<span>browsing context</span> as the browsing context.</p>
- <p>Let <var title="">result</var> be the return value of the <i>initial code entry-point</i>
+ <p>Let <var title="">result</var> be the return value of the <span>code entry-point</span>
of this <span title="concept-script">script</span>. If an exception was thrown, let <var
title="">result</var> be void instead. (The result will be void also if <span
title="concept-bc-noscript">scripting is disabled</span>.)</p>
@@ -80896,8 +80909,7 @@
</dl>
- <p>Let this new function be the only entry in the script's <span>list of code
- entry-points</span>.</p>
+ <p>Let this new function be the script's <span>code entry-point</span>.</p>
</li>
@@ -81018,7 +81030,7 @@
<dd>
- <p>Invoke <var title="">callback</var> with five arguments,
+ <p><span title="concept-invoke-event-handler">Invoke</span> <var title="">callback</var> with five arguments,
the first one having the value of <var title="">E</var>'s <code title="dom-ErrorEvent-message">message</code> attribute,
the second having the value of <var title="">E</var>'s <code title="dom-ErrorEvent-filename">filename</code> attribute,
the third having the value of <var title="">E</var>'s <code title="dom-ErrorEvent-lineno">lineno</code> attribute,
@@ -81034,7 +81046,7 @@
<dd>
- <p>Invoke <var title="">callback</var> with one argument, the value of which is the
+ <p><span title="concept-invoke-event-handler">Invoke</span> <var title="">callback</var> with one argument, the value of which is the
<code>Event</code> object <var title="">E</var>, with the <i
title="dfn-callback-this-value">callback this value</i> set to <var title="">E</var>'s <code
title="dom-Event-currentTarget">currentTarget</code>. Let <var
@@ -81044,6 +81056,9 @@
</dl>
+ <p>In this step, <dfn title="concept-invoke-event-handler">invoke</dfn> means to run the
+ <span>jump to a code entry-point</span> alorithm.</p>
+
</li>
<li>
@@ -89485,7 +89500,7 @@
environment</span>. (In either case, by definition, it is a <span>worker
environment</span>.)</p></li>
- <li>
+ <li><!-- SCRIPT EXEC -->
<p>A new <span title="concept-script">script</span> is now created, as follows.</p>
@@ -89494,8 +89509,7 @@
<p>Parse/compile/initialize <var title="">source</var> using that <span>script execution
environment</span>, as appropriate for <var title="">language</var>, and thus obtain a
- <span>list of code entry-points</span>; set the <i>initial code entry-point</i> to the
- entry-point for any executable code to be immediately run.</p>
+ <span>code entry-point</span>.</p>
<p>Set the <span>script's global object</span> to <var title="">worker global scope</var>.</p>
@@ -89540,7 +89554,7 @@
<li>
<p><span title="jump to a code entry-point">Jump</span> to the <span
- title="concept-script">script</span>'s <i>initial code entry-point</i>, and let that run until
+ title="concept-script">script</span>'s <span>code entry-point</span>, and let that run until
it either returns, fails to catch an exception, or gets prematurely aborted by the "<span>kill a
worker</span>" or "<span>terminate a worker</span>" algorithms defined below.</p>
More information about the Commit-Watchers
mailing list