Skip to content
Permalink
Browse files

[e] (0) Fix callback logic to reference Web IDL and use the right con…

…ventions.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23744
Affected topics: DOM APIs, HTML Syntax and Parsing

git-svn-id: https://svn.whatwg.org/webapps@8880 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Jan 15, 2015
1 parent 6ea4aa5 commit 5cf7951afc5b028a21eaa74f6be7c25858da9af6
Showing with 25 additions and 12 deletions.
  1. +8 −4 complete.html
  2. +8 −4 index
  3. +9 −4 source
<li><dfn id=dfn-read-only-array>Read only</dfn> (when applied to arrays)
<li><dfn id=dfn-callback-this-value>Callback this value</dfn>
<li><dfn id=concept-idl-convert><a href=http://heycam.github.io/webidl/#es-type-mapping>Converting</a></dfn> between WebIDL types and JS types
<li><dfn id=es-invoking-callback-functions><a href=http://heycam.github.io/webidl/#es-invoking-callback-functions>invoke the Web IDL callback function</a></dfn>
</ul>

<p>The Web IDL specification also defines the following types that are used in Web IDL fragments

</dl>

<p class=XXX>In this step, <dfn id=concept-invoke-event-handler>invoke</dfn> means to run the
<a href=#jump-to-a-code-entry-point id=event-handler-attributes:jump-to-a-code-entry-point>jump to a code entry-point</a> algorithm.</p>
<p>In this step, <dfn id=concept-invoke-event-handler>invoke</dfn> means to <a href=http://heycam.github.io/webidl/#es-invoking-callback-functions id=event-handler-attributes:es-invoking-callback-functions data-x-internal=es-invoking-callback-functions>invoke the Web IDL callback function</a>.</p>

<p>If an exception gets thrown by the callback, end these steps and allow the exception to
propagate. (It will propagate to the <a href=#concept-event-dispatch id=event-handler-attributes:concept-event-dispatch>DOM event dispatch
logic</a>, which will then <a href=#report-the-exception id=event-handler-attributes:report-the-exception>report the exception</a>.)</p>

<li>


<dl class=switch><dt>If the first method argument is a <code id=timers:idl-function-3><a href=#idl-function>Function</a></code><dd>

<p>Call the <code id=timers:idl-function-4><a href=#idl-function>Function</a></code>. Use the third and subsequent method
<p><a href=http://heycam.github.io/webidl/#es-invoking-callback-functions id=timers:es-invoking-callback-functions data-x-internal=es-invoking-callback-functions>Invoke</a> the <code id=timers:idl-function-4><a href=#idl-function>Function</a></code>. Use the third and subsequent method
arguments (if any) as the arguments for invoking the <code id=timers:idl-function-5><a href=#idl-function>Function</a></code>. Use <var>method context proxy</var> as the
<var>thisArg</var> for invoking the <code id=timers:idl-function-6><a href=#idl-function>Function</a></code>. <a href=#refsECMA262>[ECMA262]</a></p>


<ol><li><p>Let <var>callbacks</var> be a list of the entries in <var>doc</var>'s <a href=#list-of-animation-frame-callbacks id=animation-frames:list-of-animation-frame-callbacks-4>list of
animation frame callbacks</a>, in the order in which they were added to the list.<li><p>Set <var>doc</var>'s <a href=#list-of-animation-frame-callbacks id=animation-frames:list-of-animation-frame-callbacks-5>list of animation frame callbacks</a> to the empty
list.<li><p>For each entry in <var>callbacks</var>, in order: invoke the callback, passing
list.<li><p>For each entry in <var>callbacks</var>, in order: <a href=http://heycam.github.io/webidl/#es-invoking-callback-functions id=animation-frames:es-invoking-callback-functions data-x-internal=es-invoking-callback-functions>invoke the callback</a>, passing
<var>now</var> as the only argument, and if an exception is thrown, <a href=#report-the-exception id=animation-frames:report-the-exception>report the
exception</a>. <a href=#refsWEBIDL>[WEBIDL]</a></ol>

12 index
<li><dfn id=dfn-read-only-array>Read only</dfn> (when applied to arrays)
<li><dfn id=dfn-callback-this-value>Callback this value</dfn>
<li><dfn id=concept-idl-convert><a href=http://heycam.github.io/webidl/#es-type-mapping>Converting</a></dfn> between WebIDL types and JS types
<li><dfn id=es-invoking-callback-functions><a href=http://heycam.github.io/webidl/#es-invoking-callback-functions>invoke the Web IDL callback function</a></dfn>
</ul>

<p>The Web IDL specification also defines the following types that are used in Web IDL fragments

</dl>

<p class=XXX>In this step, <dfn id=concept-invoke-event-handler>invoke</dfn> means to run the
<a href=#jump-to-a-code-entry-point id=event-handler-attributes:jump-to-a-code-entry-point>jump to a code entry-point</a> algorithm.</p>
<p>In this step, <dfn id=concept-invoke-event-handler>invoke</dfn> means to <a href=http://heycam.github.io/webidl/#es-invoking-callback-functions id=event-handler-attributes:es-invoking-callback-functions data-x-internal=es-invoking-callback-functions>invoke the Web IDL callback function</a>.</p>

<p>If an exception gets thrown by the callback, end these steps and allow the exception to
propagate. (It will propagate to the <a href=#concept-event-dispatch id=event-handler-attributes:concept-event-dispatch>DOM event dispatch
logic</a>, which will then <a href=#report-the-exception id=event-handler-attributes:report-the-exception>report the exception</a>.)</p>

<li>


<dl class=switch><dt>If the first method argument is a <code id=timers:idl-function-3><a href=#idl-function>Function</a></code><dd>

<p>Call the <code id=timers:idl-function-4><a href=#idl-function>Function</a></code>. Use the third and subsequent method
<p><a href=http://heycam.github.io/webidl/#es-invoking-callback-functions id=timers:es-invoking-callback-functions data-x-internal=es-invoking-callback-functions>Invoke</a> the <code id=timers:idl-function-4><a href=#idl-function>Function</a></code>. Use the third and subsequent method
arguments (if any) as the arguments for invoking the <code id=timers:idl-function-5><a href=#idl-function>Function</a></code>. Use <var>method context proxy</var> as the
<var>thisArg</var> for invoking the <code id=timers:idl-function-6><a href=#idl-function>Function</a></code>. <a href=#refsECMA262>[ECMA262]</a></p>


<ol><li><p>Let <var>callbacks</var> be a list of the entries in <var>doc</var>'s <a href=#list-of-animation-frame-callbacks id=animation-frames:list-of-animation-frame-callbacks-4>list of
animation frame callbacks</a>, in the order in which they were added to the list.<li><p>Set <var>doc</var>'s <a href=#list-of-animation-frame-callbacks id=animation-frames:list-of-animation-frame-callbacks-5>list of animation frame callbacks</a> to the empty
list.<li><p>For each entry in <var>callbacks</var>, in order: invoke the callback, passing
list.<li><p>For each entry in <var>callbacks</var>, in order: <a href=http://heycam.github.io/webidl/#es-invoking-callback-functions id=animation-frames:es-invoking-callback-functions data-x-internal=es-invoking-callback-functions>invoke the callback</a>, passing
<var>now</var> as the only argument, and if an exception is thrown, <a href=#report-the-exception id=animation-frames:report-the-exception>report the
exception</a>. <a href=#refsWEBIDL>[WEBIDL]</a></ol>

13 source
<li><dfn data-x="dfn-read-only-array">Read only</dfn> (when applied to arrays)
<li><dfn data-x="dfn-callback-this-value">Callback this value</dfn>
<li><dfn data-x="concept-idl-convert" data-x-href="http://heycam.github.io/webidl/#es-type-mapping">Converting</dfn> between WebIDL types and JS types
<li><dfn data-x="es-invoking-callback-functions" data-x-href="http://heycam.github.io/webidl/#es-invoking-callback-functions">invoke the Web IDL callback function</dfn>
</ul>

<p>The Web IDL specification also defines the following types that are used in Web IDL fragments

</dl>

<p class="XXX">In this step, <dfn data-x="concept-invoke-event-handler">invoke</dfn> means to run the
<span>jump to a code entry-point</span> algorithm.</p> <!-- bug 19211 / bug 23744 -->
<p>In this step, <dfn data-x="concept-invoke-event-handler">invoke</dfn> means to <span
data-x="es-invoking-callback-functions">invoke the Web IDL callback function</span>.</p>

<p>If an exception gets thrown by the callback, end these steps and allow the exception to
propagate. (It will propagate to the <span data-x="concept-event-dispatch">DOM event dispatch
logic</span>, which will then <span>report the exception</span>.)</p>

</li>


<dd>

<p>Call the <code data-x="idl-Function">Function</code>. Use the third and subsequent method
<p><span data-x="es-invoking-callback-functions">Invoke</span> the <code data-x="idl-Function">Function</code>. Use the third and subsequent method
arguments (if any) as the arguments for invoking the <code
data-x="idl-Function">Function</code>. Use <var>method context proxy</var> as the
<var>thisArg</var> for invoking the <code data-x="idl-Function">Function</code>. <ref
<li><p>Set <var>doc</var>'s <span>list of animation frame callbacks</span> to the empty
list.</p></li>

<li><p>For each entry in <var>callbacks</var>, in order: invoke the callback, passing
<li><p>For each entry in <var>callbacks</var>, in order: <span data-x="es-invoking-callback-functions">invoke the callback</span>, passing
<var>now</var> as the only argument, and if an exception is thrown, <span>report the
exception</span>. <ref spec=WEBIDL></p></li>

0 comments on commit 5cf7951

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