Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
453 views
in Technique[技术] by (71.8m points)

dom - Have any browsers implemented the DOM3 EventListenerList?

The answer was "no" back in March 2010:

Browser EventListenerList Implementation

I'm wondering if there has been any progress since then.

If the answer's still "no" ... any indication of when any browser might support it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For those looking for a practical solution, see: How to find event listeners on a DOM node when debugging or from the JavaScript code?


EventListenerList was in some old draft of DOM 3 Events and was long removed from the spec. As far as I know, at least Gecko still doesn't have anything like this for regular web pages, although it now has an API for privileged code (extensions) to enumerate listeners (see https://bugzilla.mozilla.org/show_bug.cgi?id=570678#c0).

I looked through the W3C mailing lists, and there were a few discussions on this topic, but apparently no use-cases were found to justify the feature. This is the most recent message I could find:

[...] what is the motivation for adding this functionality at all? Previously, the working group resolved to remove the related but less powerful hasEventListenerNS method for lack of a use case, and because there are potential security issues.

(2001) http://lists.w3.org/Archives/Public/w3c-wai-ua/2001OctDec/thread.html#msg89 has some discussion from way back when the EventListenerList was considered.

(2006) http://lists.w3.org/Archives/Public/www-archive/2006Mar/0032.html asks a question to the author of quirksmode who seems to be responsible for the DOM3 EventListenerList myth about the use cases of such a feature; the archives do not list a reply.

(2008) another discussion: http://lists.w3.org/Archives/Public/public-webapi/2008Apr/thread.html#msg66

Note: Commenting on my post is not a good way to provide feedback for the browser vendors and standards organizations. I'm not affiliated with either group, and I doubt they will see or act on the comments here..


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...