From 8aa03e827a2e1660429249315e33d34a5b9c0d75 Mon Sep 17 00:00:00 2001 From: Gregory Terzian Date: Thu, 28 Jun 2018 18:45:46 +0800 Subject: [PATCH] define a "have a listener for" concept on EventTarget --- dom.bs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dom.bs b/dom.bs index ad8b27a3c..3a43237d9 100644 --- a/dom.bs +++ b/dom.bs @@ -995,6 +995,13 @@ and a legacy-canceled-activation behavior algo

These algorithms only exist for checkbox and radio <{input}> elements and are not to be used for anything else. [[!HTML]] +

An {{EventTarget}} object target is said to have a listener for +type if target's event listener list contains an +event listener whose type is type. + +

The presence, or absence, of event listeners +can not be relied on to design new APIs, see [[#observing-event-listeners]]. +

target = new EventTarget();

Creates a new {{EventTarget}} object, which can be used by developers to dispatch and