Skip to content
Permalink
Browse files

[] (0) Prepare for WebIDL integration

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=18242
Affected topics: DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@8263 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Nov 11, 2013
1 parent 178e8a9 commit aa4eccef859d73014e2555cf995bf250a6f39b1d
Showing with 66 additions and 74 deletions.
  1. +23 −23 complete.html
  2. +23 −23 index
  3. +20 −28 source

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 8 November 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 11 November 2013</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>

</dd>

</dl><h5 id=script-settings-for-browsing-contexts><span class=secno>7.1.3.2 </span>Script settings for browsing contexts</h5>
</dl><p>The <dfn id=relevant-settings-object>relevant settings object</dfn> for a global object <var title="">o</var> is the
<a href=#script-settings-object>script settings object</a> whose <a href=#global-object>global object</a> is <var title="">o</var>.
(There is always a 1:1 mapping of global objects to script settings objects.)</p>



<h5 id=script-settings-for-browsing-contexts><span class=secno>7.1.3.2 </span>Script settings for browsing contexts</h5>

<p>Whenever a new <code><a href=#window>Window</a></code> object is created, it must also create a <a href=#script-settings-object>script
settings object</a> whose algorithms are defined as follows:</p>
was most recently pushed onto it is to be <i>popped</i> from the stack, it must be removed.
Entries on this stack can be labeled as <dfn id=candidate-entry-settings-object title="candidate entry settings object">candidate entry settings objects</dfn>.</p>

<p>When a user agent is to <dfn id=jump-to-a-code-entry-point>jump to a code entry-point</dfn> for a <a href=#concept-script title=concept-script>script</a>, the user agent must run the following steps:</p>
<!--CLEANUP-->
<p>When a user agent is to <dfn id=jump-to-a-code-entry-point>jump to a code entry-point</dfn> for a <a href=#concept-script title=concept-script>script</a> <var title="">s</var>, optionally with
a <a href=#script-settings-object>script settings object</a> <var title="">context</var>, the user agent must run the
following steps:</p>

<ol><li><p>Let <var title="">s</var> be the given <a href=#concept-script title=concept-script>script</a>.</li>
<ol><li><p>If no <var title="">context</var> was provided, let <var title="">context</var> be the
<a href=#settings-object>settings object</a> of <var title="">s</var>.</li>

<!--CLEANUP-->
<li><p><a href=#prepare-to-run-a-script-based-callback>Prepare to run a script-based callback</a> with <var title="">s</var> as both the
new incumbent <a href=#concept-script title=concept-script>script</a> and the owner <a href=#concept-script title=concept-script>script</a>. If this returns "do not run" then abort these
<li><p><a href=#prepare-to-run-a-callback>Prepare to run a callback</a> with <var title="">context</var> as
the <a href=#script-settings-object>script settings object</a>. If this returns "do not run" then abort these
steps.</li>

<!--CLEANUP-->
<li><p>Make the appropriate <a href=#script-execution-environment>script execution environment</a>
specified by <var title="">s</var>'s <a href=#settings-object>settings
object</a> execute the <a href=#concept-script title=concept-script>script</a>'s <a href=#code-entry-point>code
specified by <var title="">contet</var> execute the <var title="">s</var>'s <a href=#code-entry-point>code
entry-point</a>.</li>

<li><p><a href=#clean-up-after-running-a-callback>Clean up after running a callback</a>.</li>

</ol><p>The <dfn id=prepare-to-run-a-script-based-callback>prepare to run a script-based callback</dfn> steps are as follows. They are invoked
with a new incumbent <a href=#concept-script title=concept-script>script</a> <var title="">s</var> and an owner
<a href=#concept-script title=concept-script>script</a> <var title="">o</var>, and return either "run" or "do
</ol><!--CLEANUP--><p>The steps to <dfn id=prepare-to-run-a-callback>prepare to run a callback</dfn> with
a <a href=#script-settings-object>script settings object</a> <var title="">o</var> are as follows. They
return either "run" or "do
not run".</p>

<ol><!--CLEANUP--><li><p>If the <a href=#global-object>global object</a> specified by <var title="">o</var>'s <a href=#settings-object>settings object</a>
<ol><!--CLEANUP--><li><p>If the <a href=#global-object>global object</a> specified by <var title="">o</var>
is a <code><a href=#window>Window</a></code> object whose <code><a href=#document>Document</a></code> object is not <a href=#fully-active>fully
active</a>, then return "do not run" and abort these steps.</p>

<!--CLEANUP-->
<li><p>If <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a> for the <a href=#responsible-browsing-context>responsible browsing context</a> specified by <var title="">o</var>'s <a href=#settings-object>settings object</a>, then return
<li><p>If <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a> for the <a href=#responsible-browsing-context>responsible browsing context</a> specified by <var title="">o</var>, then return
"do not run" and abort these steps.</p>

<!--CLEANUP-->
<li><p>Push <var title="">s</var>'s <a href=#settings-object>settings object</a> onto the <a href=#stack-of-script-settings-objects>stack of script settings objects</a>, and label it
<li><p>Push <var title="">o</var> onto the <a href=#stack-of-script-settings-objects>stack of script settings objects</a>, and label it
as a <a href=#candidate-entry-settings-object>candidate entry settings object</a>.</li>

<li><p>Return "run".</li>

</ol><!--CLEANUP--><p>The steps to <dfn id=prepare-to-run-a-non-script-based-callback>prepare to run a non-script-based callback</dfn> are as follows. They are
invoked with a new <a href=#script-settings-object>script settings object</a> <var title="">s</var> and,
in principle, return either "run" or "do not run" (though in practice they always return
"run").</p>

<ol><li><p>Push <var title="">s</var> onto the <a href=#stack-of-script-settings-objects>stack of script settings objects</a>.</li>

<li><p>Return "run".</li>

</ol><p>The steps to <dfn id=clean-up-after-running-a-callback>clean up after running a callback</dfn> are as follows:</p>

<ol><!--CLEANUP--><li><p>Pop the current <a href=#incumbent-settings-object>incumbent settings object</a> from the <a href=#stack-of-script-settings-objects>stack of script settings
46 index

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 8 November 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 11 November 2013</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>

</dd>

</dl><h5 id=script-settings-for-browsing-contexts><span class=secno>7.1.3.2 </span>Script settings for browsing contexts</h5>
</dl><p>The <dfn id=relevant-settings-object>relevant settings object</dfn> for a global object <var title="">o</var> is the
<a href=#script-settings-object>script settings object</a> whose <a href=#global-object>global object</a> is <var title="">o</var>.
(There is always a 1:1 mapping of global objects to script settings objects.)</p>



<h5 id=script-settings-for-browsing-contexts><span class=secno>7.1.3.2 </span>Script settings for browsing contexts</h5>

<p>Whenever a new <code><a href=#window>Window</a></code> object is created, it must also create a <a href=#script-settings-object>script
settings object</a> whose algorithms are defined as follows:</p>
was most recently pushed onto it is to be <i>popped</i> from the stack, it must be removed.
Entries on this stack can be labeled as <dfn id=candidate-entry-settings-object title="candidate entry settings object">candidate entry settings objects</dfn>.</p>

<p>When a user agent is to <dfn id=jump-to-a-code-entry-point>jump to a code entry-point</dfn> for a <a href=#concept-script title=concept-script>script</a>, the user agent must run the following steps:</p>
<!--CLEANUP-->
<p>When a user agent is to <dfn id=jump-to-a-code-entry-point>jump to a code entry-point</dfn> for a <a href=#concept-script title=concept-script>script</a> <var title="">s</var>, optionally with
a <a href=#script-settings-object>script settings object</a> <var title="">context</var>, the user agent must run the
following steps:</p>

<ol><li><p>Let <var title="">s</var> be the given <a href=#concept-script title=concept-script>script</a>.</li>
<ol><li><p>If no <var title="">context</var> was provided, let <var title="">context</var> be the
<a href=#settings-object>settings object</a> of <var title="">s</var>.</li>

<!--CLEANUP-->
<li><p><a href=#prepare-to-run-a-script-based-callback>Prepare to run a script-based callback</a> with <var title="">s</var> as both the
new incumbent <a href=#concept-script title=concept-script>script</a> and the owner <a href=#concept-script title=concept-script>script</a>. If this returns "do not run" then abort these
<li><p><a href=#prepare-to-run-a-callback>Prepare to run a callback</a> with <var title="">context</var> as
the <a href=#script-settings-object>script settings object</a>. If this returns "do not run" then abort these
steps.</li>

<!--CLEANUP-->
<li><p>Make the appropriate <a href=#script-execution-environment>script execution environment</a>
specified by <var title="">s</var>'s <a href=#settings-object>settings
object</a> execute the <a href=#concept-script title=concept-script>script</a>'s <a href=#code-entry-point>code
specified by <var title="">contet</var> execute the <var title="">s</var>'s <a href=#code-entry-point>code
entry-point</a>.</li>

<li><p><a href=#clean-up-after-running-a-callback>Clean up after running a callback</a>.</li>

</ol><p>The <dfn id=prepare-to-run-a-script-based-callback>prepare to run a script-based callback</dfn> steps are as follows. They are invoked
with a new incumbent <a href=#concept-script title=concept-script>script</a> <var title="">s</var> and an owner
<a href=#concept-script title=concept-script>script</a> <var title="">o</var>, and return either "run" or "do
</ol><!--CLEANUP--><p>The steps to <dfn id=prepare-to-run-a-callback>prepare to run a callback</dfn> with
a <a href=#script-settings-object>script settings object</a> <var title="">o</var> are as follows. They
return either "run" or "do
not run".</p>

<ol><!--CLEANUP--><li><p>If the <a href=#global-object>global object</a> specified by <var title="">o</var>'s <a href=#settings-object>settings object</a>
<ol><!--CLEANUP--><li><p>If the <a href=#global-object>global object</a> specified by <var title="">o</var>
is a <code><a href=#window>Window</a></code> object whose <code><a href=#document>Document</a></code> object is not <a href=#fully-active>fully
active</a>, then return "do not run" and abort these steps.</p>

<!--CLEANUP-->
<li><p>If <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a> for the <a href=#responsible-browsing-context>responsible browsing context</a> specified by <var title="">o</var>'s <a href=#settings-object>settings object</a>, then return
<li><p>If <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a> for the <a href=#responsible-browsing-context>responsible browsing context</a> specified by <var title="">o</var>, then return
"do not run" and abort these steps.</p>

<!--CLEANUP-->
<li><p>Push <var title="">s</var>'s <a href=#settings-object>settings object</a> onto the <a href=#stack-of-script-settings-objects>stack of script settings objects</a>, and label it
<li><p>Push <var title="">o</var> onto the <a href=#stack-of-script-settings-objects>stack of script settings objects</a>, and label it
as a <a href=#candidate-entry-settings-object>candidate entry settings object</a>.</li>

<li><p>Return "run".</li>

</ol><!--CLEANUP--><p>The steps to <dfn id=prepare-to-run-a-non-script-based-callback>prepare to run a non-script-based callback</dfn> are as follows. They are
invoked with a new <a href=#script-settings-object>script settings object</a> <var title="">s</var> and,
in principle, return either "run" or "do not run" (though in practice they always return
"run").</p>

<ol><li><p>Push <var title="">s</var> onto the <a href=#stack-of-script-settings-objects>stack of script settings objects</a>.</li>

<li><p>Return "run".</li>

</ol><p>The steps to <dfn id=clean-up-after-running-a-callback>clean up after running a callback</dfn> are as follows:</p>

<ol><!--CLEANUP--><li><p>Pop the current <a href=#incumbent-settings-object>incumbent settings object</a> from the <a href=#stack-of-script-settings-objects>stack of script settings
48 source

</dl>

<p>The <dfn>relevant settings object</dfn> for a global object <var data-x="">o</var> is the
<span>script settings object</span> whose <span>global object</span> is <var data-x="">o</var>.
(There is always a 1:1 mapping of global objects to script settings objects.)</p>



<h5>Script settings for browsing contexts</h5>
was most recently pushed onto it is to be <i>popped</i> from the stack, it must be removed.
Entries on this stack can be labeled as <dfn data-x="candidate entry settings object">candidate entry settings objects</dfn>.</p>

<!--CLEANUP-->
<p>When a user agent is to <dfn>jump to a code entry-point</dfn> for a <span
data-x="concept-script">script</span>, the user agent must run the following steps:</p>
data-x="concept-script">script</span> <var data-x="">s</var>, optionally with
a <span>script settings object</span> <var data-x="">context</var>, the user agent must run the
following steps:</p>

<ol>

<li><p>Let <var data-x="">s</var> be the given <span
data-x="concept-script">script</span>.</p></li>
<li><p>If no <var data-x="">context</var> was provided, let <var data-x="">context</var> be the
<span>settings object</span> of <var data-x="">s</var>.</p></li>

<!--CLEANUP-->
<li><p><span>Prepare to run a script-based callback</span> with <var data-x="">s</var> as both the
new incumbent <span data-x="concept-script">script</span> and the owner <span
data-x="concept-script">script</span>. If this returns "do not run" then abort these
<li><p><span>Prepare to run a callback</span> with <var data-x="">context</var> as
the <span>script settings object</span>. If this returns "do not run" then abort these
steps.</p></li>

<!--CLEANUP-->
<li><p>Make the appropriate <span>script execution environment</span>
specified by <var data-x="">s</var>'s <span>settings
object</span> execute the <span data-x="concept-script">script</span>'s <span>code
specified by <var data-x="">contet</var> execute the <var data-x="">s</var>'s <span>code
entry-point</span>.</p></li>

<li><p><span>Clean up after running a callback</span>.</p></li>

</ol>

<p>The <dfn>prepare to run a script-based callback</dfn> steps are as follows. They are invoked
with a new incumbent <span data-x="concept-script">script</span> <var data-x="">s</var> and an owner
<span data-x="concept-script">script</span> <var data-x="">o</var>, and return either "run" or "do
<!--CLEANUP-->
<p>The steps to <dfn>prepare to run a callback</dfn> with
a <span>script settings object</span> <var data-x="">o</var> are as follows. They
return either "run" or "do
not run".</p>

<ol>

<!--CLEANUP-->
<li><p>If the <span>global object</span> specified by <var data-x="">o</var>'s <span>settings object</span>
<li><p>If the <span>global object</span> specified by <var data-x="">o</var>
is a <code>Window</code> object whose <code>Document</code> object is not <span>fully
active</span>, then return "do not run" and abort these steps.</p>

<!--CLEANUP-->
<li><p>If <span data-x="concept-bc-noscript">scripting is disabled</span> for the <span>responsible browsing context</span> specified by <var
data-x="">o</var>'s <span>settings object</span>, then return
data-x="">o</var>, then return
"do not run" and abort these steps.</p>

<!--CLEANUP-->
<li><p>Push <var data-x="">s</var>'s <span>settings object</span> onto the <span>stack of script settings objects</span>, and label it
<li><p>Push <var data-x="">o</var> onto the <span>stack of script settings objects</span>, and label it
as a <span>candidate entry settings object</span>.</p></li>

<li><p>Return "run".</p></li>

</ol>

<!--CLEANUP-->
<p>The steps to <dfn>prepare to run a non-script-based callback</dfn> are as follows. They are
invoked with a new <span>script settings object</span> <var data-x="">s</var> and,
in principle, return either "run" or "do not run" (though in practice they always return
"run").</p>

<ol>

<li><p>Push <var data-x="">s</var> onto the <span>stack of script settings objects</span>.</p></li>

<li><p>Return "run".</p></li>

</ol>

<p>The steps to <dfn>clean up after running a callback</dfn> are as follows:</p>

<ol>

0 comments on commit aa4ecce

Please sign in to comment.
You can’t perform that action at this time.