W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2000

Re: event bubbling and capture

From: Joseph Kesselman/Watson/IBM <keshlam@us.ibm.com>
Date: Mon, 25 Sep 2000 16:04:41 -0400
To: www-dom@w3.org
Message-ID: <OF86FD8BD2.10E71A9D-ON85256965.004C916B@pok.ibm.com>

>If a listener registers for an event but sets the useCapture parameter to
>true when the event uses bubbling or to false when the event uses
capturing
>then the listener will not be notified when the event occurs. I've got to
be
>wrong here! I don't understand the purpose of the useCapture parameter.

useCapture controls which phase of event propigation this listener has
registered for. It will recieve events _ONLY_ during that phase. If you
register for a phase that isn't used by a particular event, the listener
will never be called during that phase.

If you want to recieve notification during both capture and bubbling
phases, you can explicitly register the listener twice, once for each
phase.

(It might be a good idea to add that last sentence to the description of
useCapture.)




______________________________________
Joe Kesselman  / IBM Research
Received on Monday, 25 September 2000 16:04:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT