Skip to content
Permalink
Browse files

Explain in many different ways that events cannot cause actions. Fixes

  • Loading branch information...
annevk committed Aug 3, 2015
1 parent 8f812e6 commit 24ab873d17669b5c1994a3dd92a27d29b1dd03e4
Showing with 38 additions and 12 deletions.
  1. +16 −4 dom.bs
  2. +22 −8 dom.html
20 dom.bs
@@ -1192,12 +1192,24 @@ down. If the <a>event</a> needs its {{Event/bubbles}} or
initialized to true".


<h3 id=action-versus-occurance>Action versus occurrence</h3>

<h2 id='nodes'>
Nodes</h2>
<p>An <a>event</a> signifies an occurrence, not an action. Phrased differently, it
represents a notification from an algorithm and can be used to influence the future course
of that algorithm (e.g., through invoking {{preventDefault()}}). <a>Events</a> must not be
used as actions or initiators that cause some algorithm to start running. That is not what
they are for.

<h3 id='introduction-to-the-dom'>
Introduction to "The DOM"</h3>
<p class="note no-backref">This is called out here specifically because previous
iterations of the DOM had a concept of "default actions" associated with <a>events</a>
that gave folks all the wrong ideas. <a>Events</a> do not represent or cause actions, they
can only be used to influence an ongoing one.



<h2 id=nodes>Nodes</h2>

<h3 id=introduction-to-the-dom>Introduction to "The DOM"</h3>

In its original sense, "The DOM" is an API for
accessing and manipulating documents (in particular, HTML and XML
@@ -157,12 +157,11 @@ <h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="cont
Interface <code class="idl"><span>EventTarget</span></code></span></a>
<li><a href="#dispatching-events"><span class="secno">3.7</span> <span class="content">Dispatching events</span></a>
<li><a href="#firing-events"><span class="secno">3.8</span> <span class="content">Firing events</span></a>
<li><a href="#action-versus-occurance"><span class="secno">3.9</span> <span class="content">Action versus occurrence</span></a>
</ul>
<li><a href="#nodes"><span class="secno">4</span> <span class="content">
Nodes</span></a>
<li><a href="#nodes"><span class="secno">4</span> <span class="content">Nodes</span></a>
<ul class="toc">
<li><a href="#introduction-to-the-dom"><span class="secno">4.1</span> <span class="content">
Introduction to "The DOM"</span></a>
<li><a href="#introduction-to-the-dom"><span class="secno">4.1</span> <span class="content">Introduction to "The DOM"</span></a>
<li><a href="#node-trees"><span class="secno">4.2</span> <span class="content">
Node tree</span></a>
<ul class="toc">
@@ -1604,13 +1603,28 @@ <h3 class="heading settled" data-level="3.8" id="firing-events"><span class="sec



<h3 class="heading settled" data-level="3.9" id="action-versus-occurance"><span class="secno">3.9. </span><span class="content">Action versus occurrence</span><a class="self-link" href="#action-versus-occurance"></a></h3>

<h2 class="heading settled" data-level="4" id="nodes"><span class="secno">4. </span><span class="content">
Nodes</span><a class="self-link" href="#nodes"></a></h2>

<p>An <a data-link-type="dfn" href="#concept-event">event</a> signifies an occurrence, not an action. Phrased differently, it
represents a notification from an algorithm and can be used to influence the future course
of that algorithm (e.g., through invoking <code class="idl"><a data-link-type="idl" href="#dom-event-preventdefault">preventDefault()</a></code>). <a data-link-type="dfn" href="#concept-event">Events</a> must not be
used as actions or initiators that cause some algorithm to start running. That is not what
they are for.

<h3 class="heading settled" data-level="4.1" id="introduction-to-the-dom"><span class="secno">4.1. </span><span class="content">
Introduction to "The DOM"</span><a class="self-link" href="#introduction-to-the-dom"></a></h3>
</p>
<p class="note no-backref" role="note">This is called out here specifically because previous
iterations of the DOM had a concept of "default actions" associated with <a data-link-type="dfn" href="#concept-event">events</a>
that gave folks all the wrong ideas. <a data-link-type="dfn" href="#concept-event">Events</a> do not represent or cause actions, they
can only be used to influence an ongoing one.



</p>
<h2 class="heading settled" data-level="4" id="nodes"><span class="secno">4. </span><span class="content">Nodes</span><a class="self-link" href="#nodes"></a></h2>


<h3 class="heading settled" data-level="4.1" id="introduction-to-the-dom"><span class="secno">4.1. </span><span class="content">Introduction to "The DOM"</span><a class="self-link" href="#introduction-to-the-dom"></a></h3>


<p>In its original sense, "The DOM" is an API for

0 comments on commit 24ab873

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