Skip to content

Commit

Permalink
Revert: redispatching was not this simple.
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Dec 5, 2012
1 parent 6e23432 commit bf3fb56
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 58 deletions.
37 changes: 9 additions & 28 deletions Overview.src.html
Expand Up @@ -1126,20 +1126,8 @@ <h3>Interface <code>EventTarget</code></h3>

<h3>Dispatching events</h3>

<p>Specifications may define
<dfn title=concept-event-redispatch>redispatching steps</dfn> to make it
possible to <span title=concept-event-dispatch>dispatch</span> across
distinct <span title=concept-tree>trees</span>. The
<span title=concept-event-redispatch>redispatching steps</span> are passed a
copy of the <span title=concept-event>event</span> that is dispatched and
are only invoked if the
<span title=concept-event-redispatch>redispatching steps</span> algorithm is
passed to the <span title=concept-event-dispatch>dispatch</span> algorithm.

<p>To <dfn title=concept-event-dispatch>dispatch</dfn> an
<span title=concept-event>event</span> to a given object, optionally with
<span title=concept-event-redispatch>redispatching steps</span>, run these
steps:
<span title=concept-event>event</span> to a given object run these steps:

<ol>
<li><p>Let <var title>event</var> be the
Expand Down Expand Up @@ -1170,22 +1158,15 @@ <h3>Dispatching events</h3>
<var title>event</var>, as long as <var title>event</var>'s
<span>stop propagation flag</span> is unset.

<li>
<p>If the <span title=concept-event-redispatch>redispatching steps</span>
are given, run them with a copy of <var title>event</var> and then go to
the next step. Otherwise run these substeps first:

<ol>
<li><p>Initialize <var title>event</var>'s
<code title=dom-Event-eventPhase>eventPhase</code> attribute to
<code title=dom-Event-AT_TARGET>AT_TARGET</code>.
<li><p>Initialize <var title>event</var>'s
<code title=dom-Event-eventPhase>eventPhase</code> attribute to
<code title=dom-Event-AT_TARGET>AT_TARGET</code>.

<li><p><span title=concept-event-listener-invoke>Invoke</span> the
<span title=concept-event-listener>event listeners</span> of
<var title>event</var>'s <code title=dom-Event-target>target</code>
attribute value with <var title>event</var>, if <var title>event</var>'s
<span>stop propagation flag</span> is unset.
</ol>
<li><p><span title=concept-event-listener-invoke>Invoke</span> the
<span title=concept-event-listener>event listeners</span> of
<var title>event</var>'s <code title=dom-Event-target>target</code>
attribute value with <var title>event</var>, if <var title>event</var>'s
<span>stop propagation flag</span> is unset.

<li>
<p>If <var title>event</var>'s
Expand Down
41 changes: 11 additions & 30 deletions dom-core.html
Expand Up @@ -10,7 +10,7 @@

<p><a class="logo" href="//www.whatwg.org/"><img alt="WHATWG" height="100" src="//resources.whatwg.org/logo-dom.svg" width="100"></a></p>
<h1>DOM</h1>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-4-december-2012">Living Standard — Last Updated 4 December 2012</h2>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-5-december-2012">Living Standard — Last Updated 5 December 2012</h2>

<dl>
<dt>This Version:
Expand Down Expand Up @@ -42,7 +42,7 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-4-december-2012">
<p class="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"></a>
To the extent possible under law, the editors have waived all copyright and
related or neighboring rights to this work. In addition, as of
4 December 2012, the editors have made this specification available
5 December 2012, the editors have made this specification available
under the
<a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
which is available at
Expand Down Expand Up @@ -1199,20 +1199,8 @@ <h3 id="interface-eventtarget"><span class="secno">4.6 </span>Interface <code><a

<h3 id="dispatching-events"><span class="secno">4.7 </span>Dispatching events</h3>

<p>Specifications may define
<dfn id="concept-event-redispatch" title="concept-event-redispatch">redispatching steps</dfn> to make it
possible to <a href="#concept-event-dispatch" title="concept-event-dispatch">dispatch</a> across
distinct <a href="#concept-tree" title="concept-tree">trees</a>. The
<a href="#concept-event-redispatch" title="concept-event-redispatch">redispatching steps</a> are passed a
copy of the <a href="#concept-event" title="concept-event">event</a> that is dispatched and
are only invoked if the
<a href="#concept-event-redispatch" title="concept-event-redispatch">redispatching steps</a> algorithm is
passed to the <a href="#concept-event-dispatch" title="concept-event-dispatch">dispatch</a> algorithm.

<p>To <dfn id="concept-event-dispatch" title="concept-event-dispatch">dispatch</dfn> an
<a href="#concept-event" title="concept-event">event</a> to a given object, optionally with
<a href="#concept-event-redispatch" title="concept-event-redispatch">redispatching steps</a>, run these
steps:
<a href="#concept-event" title="concept-event">event</a> to a given object run these steps:

<ol>
<li><p>Let <var title="">event</var> be the
Expand Down Expand Up @@ -1243,22 +1231,15 @@ <h3 id="dispatching-events"><span class="secno">4.7 </span>Dispatching events</h
<var title="">event</var>, as long as <var title="">event</var>'s
<a href="#stop-propagation-flag">stop propagation flag</a> is unset.

<li>
<p>If the <a href="#concept-event-redispatch" title="concept-event-redispatch">redispatching steps</a>
are given, run them with a copy of <var title="">event</var> and then go to
the next step. Otherwise run these substeps first:

<ol>
<li><p>Initialize <var title="">event</var>'s
<code title="dom-Event-eventPhase"><a href="#dom-event-eventphase">eventPhase</a></code> attribute to
<code title="dom-Event-AT_TARGET"><a href="#dom-event-at_target">AT_TARGET</a></code>.
<li><p>Initialize <var title="">event</var>'s
<code title="dom-Event-eventPhase"><a href="#dom-event-eventphase">eventPhase</a></code> attribute to
<code title="dom-Event-AT_TARGET"><a href="#dom-event-at_target">AT_TARGET</a></code>.

<li><p><a href="#concept-event-listener-invoke" title="concept-event-listener-invoke">Invoke</a> the
<a href="#concept-event-listener" title="concept-event-listener">event listeners</a> of
<var title="">event</var>'s <code title="dom-Event-target"><a href="#dom-event-target">target</a></code>
attribute value with <var title="">event</var>, if <var title="">event</var>'s
<a href="#stop-propagation-flag">stop propagation flag</a> is unset.
</ol>
<li><p><a href="#concept-event-listener-invoke" title="concept-event-listener-invoke">Invoke</a> the
<a href="#concept-event-listener" title="concept-event-listener">event listeners</a> of
<var title="">event</var>'s <code title="dom-Event-target"><a href="#dom-event-target">target</a></code>
attribute value with <var title="">event</var>, if <var title="">event</var>'s
<a href="#stop-propagation-flag">stop propagation flag</a> is unset.

<li>
<p>If <var title="">event</var>'s
Expand Down

0 comments on commit bf3fb56

Please sign in to comment.