-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
The JavaScript Workshop
By :
Regardless of which node has dispatched the event, all event notifications start at the document node. They then travel in capture mode through the tree branches toward the node that dispatched it (the target node). Once all the appropriate capture handlers along that path have been invoked, the event then travels back to the document node, invoking all the appropriate bubbling handlers.
When traveling down the tree, the event is said to be in its capture phase and is said to be in its bubbling phase when returning to the document node. It is in its target phase when the target nodes handlers are invoked, regardless of whether it is its capturing handler or bubbling handler.
At any point in an event's round-trip travels, it may be halted by a handler, preventing all further event handlers from being invoked.
Sometimes, when handling events, you may need to stop an event in its tracks. Knowing an event may be...