- From: Travis Leithead <travil@windows.microsoft.com>
- Date: Wed, 9 Apr 2008 12:54:56 -0700
- To: Doug Schepers <schepers@w3.org>, Web API public <public-webapi@w3.org>
Thanks to all the feedback on the Telecon. Here's the revised proposal: ========================= IDL Definition // Introduced in DOM Level 2: // New in DOM Level 3: typedef sequence<EventListener> EventListenerList; // Introduced in DOM Level 2: Interface Event { // PhaseType const unsigned short CAPTURING_PHASE = 1; const unsigned short AT_TARGET = 2; const unsigned short BUBBLING_PHASE = 3; // Introduced in DOM Level 3: // Used specifically for the eventPhaseFilter param const unsigned short ALL_PHASES = 4; ... } interface EventTarget { ... // Introduced in DOM Level 3: EventListenerList getEventListeners(in DOMString typeFilter, in unsigned short eventPhaseFilter); // Introduced in DOM Level 3: // (BIG QUESTION: Is this needed? If *NS methods are tossed, then toss this too) EventListenerList getEventListenersNS(in DOMString namespaceURIFilter, in DOMString typeFilter, in unsigned short eventPhaseFilter); }; * For DOMString parameters, the value of "*" represents the 'all' filter. Examples: [EventTarget].getEventListeners('click', 4); returns all of the 'click' events added to the object for all event phases. [EventTarget].getEventListeners('*', 4); returns all events in all phases. * The sequence of EventListeners returned from this API _must_ be in the order in which said event listeners will fire on the object (i.e., the order must be [capture events first sorted in order in which they will be fired, then bubble events sorted in the order in which they will fire). Given this, what is the behavior for calling getEventListeners("*", 2)? I'd assume that since no events can be registered only for the "target phase" that the returned EventListenerList would always be empty. ================ Travis Leithead - OM Program Manager - Internet Explorer [1] http://lists.w3.org/Archives/Public/public-webapi/2008Apr/0001.html [2] http://dev.w3.org/cvsweb/~checkout~/2006/webapi/Binding4DOM/Overview.html?rev=1.66&content-type=text/html;%20charset=iso-8859-1
Received on Wednesday, 9 April 2008 19:55:38 UTC