- From: Anne van Kesteren <notifications@github.com>
- Date: Tue, 14 Jan 2020 04:54:39 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/820/review/342507747@github.com>
annevk commented on this pull request.
> @@ -1146,7 +1146,7 @@ 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>To <dfn export>add an event listener</dfn> given an {{EventTarget}} object <var>eventTarget</var>
+<p>To <dfn export>add an event listener</dfn>, given an {{EventTarget}} object <var>eventTarget</var>
The last thing needs to go on the next line due to exceeding 100 columns.
> @@ -1196,9 +1196,13 @@ method, when invoked, must run these steps:
<a>report a warning to the console</a> that this might not give the expected results.
[[!SERVICE-WORKERS]]
- <li><p>Set <var>listener</var>'s <a for="event listener">removed</a> to true and
- <a for=list>remove</a> <var>listener</var> from <var>eventTarget</var>'s
- <a for=EventTarget>event listener list</a>.
+ <li><p>If <var>eventTarget</var>'s <a for=EventTarget>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 set <var>listener</var>'s
+ <a for="event listener">removed</a> to true and <a for=list>remove</a> <var>listener</var> from
+ <var>eventTarget</var>'s <a for=EventTarget>event listener list</a>.
</ol>
<p class=note>HTML needs this to define event handlers. [[HTML]]
Maybe update this note to indicate that the contains check above always no-ops when HTML calls this? Or maybe call that out in an HTML comment. Just keep that knowledge around somewhere.
--
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/820#pullrequestreview-342507747
Received on Tuesday, 14 January 2020 12:54:46 UTC