Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a "has listeners for" algorithm on EventTarget #660

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,13 @@ and a <dfn export for=EventTarget>legacy-canceled-activation behavior</dfn> algo
<p class="note no-backref">These algorithms only exist for checkbox and radio <{input}> elements and
are not to be used for anything else. [[!HTML]]

<p>An {{EventTarget}} object <var>target</var> is said to <dfn export>have a listener for</dfn>
<var>type</var> if <var>target</var>'s <a>event listener list</a> <a for=list>contains</a> an
<a>event listener</a> whose <a for="event listener">type</a> is <var>type</var>.

<p class="note no-backref">The presence or absence of event listeners is not to be used when
designing new APIs; see [[#observing-event-listeners]].

<dl class=domintro>
<dt><code><var>target</var> = new <a constructor for=EventTarget lt=EventTarget()>EventTarget</a>();</code>
<dd><p>Creates a new {{EventTarget}} object, which can be used by developers to <a>dispatch</a> and
Expand Down