- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 13 Mar 2018 20:56:30 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/596/review/103684887@github.com>
domenic commented on this pull request.
Only editorial issues; the approach looks good.
> @@ -328,7 +328,7 @@ method, passing the same arguments.
{{Event}} interface (or a derived interface). In the example above
<var ignore>ev</var> is the <a>event</a>. It is
passed as argument to
-<a>event listener</a>'s <b>callback</b>
+<a>event listener</a>'s <a for="event listener">callback</a>
Yesss I've been wanting this for a while.
>
- The <var>options</var> argument sets listener-specific options. For compatibility this can be just
- a boolean, in which case the method behaves exactly as if the value was specified as
+ <p>The <var>options</var> argument sets listener-specific options. For compatibility this can be a
+ boolean, in which case the method behaves exactly as if the value was specified as
<var>options</var>' <code>capture</code> member.
While here you could make all these `<code>`s link to the dictionary member definitions, as is done in the algorithms below.
> <var>options</var>' <code>capture</code> member.
- When set to true, <var>options</var>' <code>capture</code> member prevents <b>callback</b> from
- being invoked when the <a>event</a>'s {{Event/eventPhase}} attribute value is
- {{Event/BUBBLING_PHASE}}. When false (or not present), <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}}.
+ <p>When set to true, <var>options</var>' <code>capture</code> member prevents
While here you could consistify to use "options's" per https://wiki.whatwg.org/wiki/Style#Grammar
> @@ -1038,13 +1038,12 @@ must return a new {{EventTarget}}.
if this would be useful for your programs. For now, all author-created {{EventTarget}}s do not
participate in a tree structure.</p>
-<p>The
-<dfn method for=EventTarget><code>addEventListener(<var>type</var>, <var>callback</var>, <var>options</var>)</code></dfn>
-method, when invoked, must run these steps:
+<p>To <dfn export>add an event listener</dfn> given an <code>EventTarget</code> object
`{{EventTarget}}` instead of just code
> @@ -1054,34 +1053,53 @@ method, when invoked, must run these steps:
to avoid non-deterministic changes to the event listeners, invocation of the method is allowed
only during the very first evaluation of the service worker script.
- <li><p>If <var>callback</var> is null, then return.
+ <li><p>If <var>listener</var>'s <a for="event listener">callback</a> is null, then return.
+
+ <li><p>If <var>eventTarget</var>'s <a>event listener list</a> does not <a for=list>contain</a> an
+ <a>event listener</a> whose <a for="event listener">type</a> is <var>listener</var>'s
+ <a for="event listener">type</a>, <a for="event listener">callback</a> is <var>listener</var>'s
+ <a for="event listener">callback</a>, and <a for="event listener">capture</a> is
+ <var>listener</var>'s <a for="event listener">capture</a>, then <a for=list>append</a>
+ <var>listener</var> to <var>eventTarget</var>'s <a>event listener list</a>.
+</ol>
+
+<p class=note>The <a>add an event listener</a> concept exists to ensure
+<a>event handler attributes</a> use the same code path. [[HTML]]
This link is not working
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/596#pullrequestreview-103684887
Received on Wednesday, 14 March 2018 03:57:01 UTC