Skip to content

Commit

Permalink
[e] (0) Fix callback logic to reference Web IDL and use the right con…
Browse files Browse the repository at this point in the history
…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 5cf7951
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
12 changes: 8 additions & 4 deletions complete.html
Expand Up @@ -2351,6 +2351,7 @@ <h4 id=dependencies>2.2.2 Dependencies</h4>
<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
Expand Down Expand Up @@ -63531,8 +63532,11 @@ <h5 id=event-handler-attributes>8.1.5.1 Event handlers</h5><div class=status><in

</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>

Expand Down Expand Up @@ -64562,7 +64566,7 @@ <h3 id=timers>8.4 Timers</h3><div class=status><input onclick=toggleStatus(this)

<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>

Expand Down Expand Up @@ -66392,7 +66396,7 @@ <h3 id=animation-frames>8.8 Animation Frames</h3><div class=status><input onclic

<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>

Expand Down
12 changes: 8 additions & 4 deletions index
Expand Up @@ -2351,6 +2351,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<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
Expand Down Expand Up @@ -63531,8 +63532,11 @@ dictionary <dfn id=erroreventinit>ErrorEventInit</dfn> : <a href=#eventinit id=t

</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>

Expand Down Expand Up @@ -64562,7 +64566,7 @@ interface <dfn id=windowtimers>WindowTimers</dfn> {

<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>

Expand Down Expand Up @@ -66392,7 +66396,7 @@ loadMySprites().then(runDemo);</pre>

<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>

Expand Down
13 changes: 9 additions & 4 deletions source
Expand Up @@ -2841,6 +2841,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<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
Expand Down Expand Up @@ -85860,8 +85861,12 @@ dictionary <dfn>ErrorEventInit</dfn> : <span>EventInit</span> {

</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>

Expand Down Expand Up @@ -87324,7 +87329,7 @@ interface <dfn>WindowTimers</dfn> {

<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
Expand Down Expand Up @@ -89971,7 +89976,7 @@ loadMySprites().then(runDemo);</pre>
<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>

Expand Down

0 comments on commit 5cf7951

Please sign in to comment.