- From: Sarika Garg <sagarg@quark.com>
- Date: Mon, 11 Apr 2005 20:11:42 +0530
- To: <www-dom@w3.org>
- Message-ID: <2BC68159E3EC814BA1E81C108DF99A4203545CD1@EXCH-IND-VS1.india.quark.com>
Hi, I have a query on the canTrigger() method introduced in DOM Events level 3 Specification. The specification says that: This method allows the DOM application to know if an event listener, attached to this EventTarget or one of its ancestors, will be triggered by the specified event type during the dispatch of the event to this event target or one of its descendants. Parameters type of type DOMString The event type for which the EventListener is registered. Return Value boolean true if an event listener will be triggered on the event target with the specified event type, false otherwise. Does it mean that we need to check if there are any event listeners of the event type passed as parameter registered on the eventTarget or its ancestors? If there are any listeners of the particular event type registered, canTrigger() will return true else false. I mean what is the basis of determining that an event will be triggered? Secondly, are we talking about the capture phase when we say dispatch of the event to the event target or one of its descendants. Regards, Sarika.
Received on Tuesday, 12 April 2005 04:59:24 UTC