In DOM2 Events and older drafts of DOM 3 Events, it was written like
this
If true, useCapture indicates that the user wishes to add the event
listener for the capture phase only, i.e. this event listener will not
be triggered during the target and bubbling phases. If false, the
event listener must only be triggered during the target and bubbling
phases.
So when you do target.addEventListener('foo', listener , true) then
your listener will not execute when a 'foo' event fires on this
target, since it's "target phase" not "capture phase".
However, no browsers have followed this for years (I guess it's
because a lot of sites used true there and complained that it doesn't
work). As of 21st of April 2010, it's written like this.
If true, useCapture indicates that the user wishes to add the event
listener for the capture phase ***and target*** only, i.e. this event
listener will not be triggered during the bubbling phase. If false,
the event listener must only be triggered during the target and
bubbling phases.
A.TAKAYAMA
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]