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

event bubbling and capture

From: R. Mark Volkmann <volkmann@inlink.com>
Date: Sat, 23 Sep 2000 21:55:00 -0500
Message-ID: <000f01c025d2$d5dc0520$0100a8c0@mark>
To: <www-dom@w3.org>
I'd like to verify my current understanding of DOM Level 2 Event handling. I
may be misunderstanding parts of the spec. Where am I off base in the
statements below?

All events are delivered in one of three ways.
1) only delivered to the event target
2) delivered to the event target and containing nodes using bubbling (from
event target up to Document)
3) delivered to the event target and containing nodes using capturing (from
Document down to event target)

This is specific to the event and cannot be changed. For example,
MouseEvents always bubble.

When listeners register with an event target using the addEventListener
method in EventTarget they must specify the event type and whether they want
to use capture.

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.
Received on Saturday, 23 September 2000 22:50:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC