Skip to content

Commit

Permalink
Minor rewording of non-normative addEventListener() text.
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Jun 29, 2015
1 parent 04bc94b commit 04b1837
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 48 deletions.
34 changes: 11 additions & 23 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -979,30 +979,18 @@ concept.
<dl class=domintro>
<dt><code><var>target</var> . <a method lt="addEventListener()">addEventListener</a>(<var>type</var>, <var>callback</var> [, <var>capture</var> = false])</code>
<dd>
Appends an <a>event listener</a>
for <a>events</a> whose
{{Event/type}} attribute value is
<var>type</var>. The <var>callback</var> argument sets the
<b>callback</b> that will be invoked when the
<a>event</a> is
<a>dispatched</a>. When set to true,
Appends an <a>event listener</a> for <a>events</a> whose {{Event/type}} attribute value
is <var>type</var>. The <var>callback</var> argument sets the <b>callback</b> that will
be invoked when the <a>event</a> is <a>dispatched</a>. When set to true,
the <var>capture</var> argument prevents <b>callback</b> from being invoked when
the <a>event</a>'s
{{Event/eventPhase}} attribute value is
{{Event/BUBBLING_PHASE}}. When false, <b>callback</b>
will not be invoked when <a>event</a>'s
{{Event/eventPhase}} attribute value is
{{Event/CAPTURING_PHASE}}. Either way,
<b>callback</b> will be invoked when <a>event</a>'s
{{Event/eventPhase}} attribute value is
{{Event/AT_TARGET}}.

The <a>event listener</a> is
appended to <var>target</var>'s list of
<a>event listeners</a> and is not
appended if it is a duplicate (the
<a>event listeners</a> in the list are
unique).
the <a>event</a>'s {{Event/eventPhase}} attribute value is {{Event/BUBBLING_PHASE}}.
When false, <b>callback</b> will not be invoked when <a>event</a>'s {{Event/eventPhase}}
attribute value is {{Event/CAPTURING_PHASE}}. Either way, <b>callback</b> will be
invoked if <a>event</a>'s {{Event/eventPhase}} attribute value is {{Event/AT_TARGET}}.

The <a>event listener</a> is appended to <var>target</var>'s list of
<a>event listeners</a> and is not appended if it is a duplicate, i.e. having the same
<b>type</b>, <b>callback</b>, and <b>capture</b> values.

<dt><code><var>target</var> . <a method lt="removeEventListener()">removeEventListener</a>(<var>type</var>, <var>callback</var> [, <var>capture</var> = false])</code>
<dd>Remove the <a>event listener</a>
Expand Down
38 changes: 13 additions & 25 deletions dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<h1 class="p-name no-ref allcaps" id="title">DOM</h1>

<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated
<time class="dt-updated" datetime="2015-06-26">26 June 2015</time></span></h2>
<time class="dt-updated" datetime="2015-06-29">29 June 2015</time></span></h2>

<div data-fill-with="spec-metadata">
<dl>
Expand Down Expand Up @@ -1328,31 +1328,19 @@ <h3 class="heading settled" data-level="3.6" id="interface-eventtarget"><span cl
<dt><code><var>target</var> . <a class="idl-code" data-link-type="method" href="#dom-eventtarget-addeventlistener">addEventListener</a>(<var>type</var>, <var>callback</var> [, <var>capture</var> = false])</code>

<dd>
Appends an <a data-link-type="dfn" href="#concept-event-listener">event listener</a>
for <a data-link-type="dfn" href="#concept-event">events</a> whose
<code class="idl"><a data-link-type="idl" href="#dom-event-type">type</a></code> attribute value is
<var>type</var>. The <var>callback</var> argument sets the
<b>callback</b> that will be invoked when the
<a data-link-type="dfn" href="#concept-event">event</a> is
<a data-link-type="dfn" href="#concept-event-dispatch">dispatched</a>. When set to true,
Appends an <a data-link-type="dfn" href="#concept-event-listener">event listener</a> for <a data-link-type="dfn" href="#concept-event">events</a> whose <code class="idl"><a data-link-type="idl" href="#dom-event-type">type</a></code> attribute value
is <var>type</var>. The <var>callback</var> argument sets the <b>callback</b> that will
be invoked when the <a data-link-type="dfn" href="#concept-event">event</a> is <a data-link-type="dfn" href="#concept-event-dispatch">dispatched</a>. When set to true,
the <var>capture</var> argument prevents <b>callback</b> from being invoked when
the <a data-link-type="dfn" href="#concept-event">event</a>’s
<code class="idl"><a data-link-type="idl" href="#dom-event-eventphase">eventPhase</a></code> attribute value is
<code class="idl"><a data-link-type="idl" href="#dom-event-bubbling_phase">BUBBLING_PHASE</a></code>. When false, <b>callback</b>
will not be invoked when <a data-link-type="dfn" href="#concept-event">event</a>’s
<code class="idl"><a data-link-type="idl" href="#dom-event-eventphase">eventPhase</a></code> attribute value is
<code class="idl"><a data-link-type="idl" href="#dom-event-capturing_phase">CAPTURING_PHASE</a></code>. Either way,
<b>callback</b> will be invoked when <a data-link-type="dfn" href="#concept-event">event</a>’s
<code class="idl"><a data-link-type="idl" href="#dom-event-eventphase">eventPhase</a></code> attribute value is
<code class="idl"><a data-link-type="idl" href="#dom-event-at_target">AT_TARGET</a></code>.


<p>The <a data-link-type="dfn" href="#concept-event-listener">event listener</a> is
appended to <var>target</var>’s list of
<a data-link-type="dfn" href="#concept-event-listener">event listeners</a> and is not
appended if it is a duplicate (the
<a data-link-type="dfn" href="#concept-event-listener">event listeners</a> in the list are
unique).</p>
the <a data-link-type="dfn" href="#concept-event">event</a>’s <code class="idl"><a data-link-type="idl" href="#dom-event-eventphase">eventPhase</a></code> attribute value is <code class="idl"><a data-link-type="idl" href="#dom-event-bubbling_phase">BUBBLING_PHASE</a></code>.
When false, <b>callback</b> will not be invoked when <a data-link-type="dfn" href="#concept-event">event</a>’s <code class="idl"><a data-link-type="idl" href="#dom-event-eventphase">eventPhase</a></code>
attribute value is <code class="idl"><a data-link-type="idl" href="#dom-event-capturing_phase">CAPTURING_PHASE</a></code>. Either way, <b>callback</b> will be
invoked if <a data-link-type="dfn" href="#concept-event">event</a>’s <code class="idl"><a data-link-type="idl" href="#dom-event-eventphase">eventPhase</a></code> attribute value is <code class="idl"><a data-link-type="idl" href="#dom-event-at_target">AT_TARGET</a></code>.


<p>The <a data-link-type="dfn" href="#concept-event-listener">event listener</a> is appended to <var>target</var>’s list of
<a data-link-type="dfn" href="#concept-event-listener">event listeners</a> and is not appended if it is a duplicate, i.e. having the same
<b>type</b>, <b>callback</b>, and <b>capture</b> values.</p>



Expand Down

0 comments on commit 04b1837

Please sign in to comment.