StopPropagation
From Svg wiki
Contents |
[edit]
Description
The stopPropagation method the event, preventing further upward bubbling of the event. This means that no event listeners higher up in the document hierarchy will receive this event.
Warning: In many script implementationsstopPropagation also seems to prevent any default actions for this event by the UA, such as the activation of the right-click context menu. It is not clear that this should be the case from DOM3, which indicates that preventDefault should be used to do that.
[edit]
Type
Method
[edit]
Parameters
None
[edit]
Methods
None
[edit]
Return Value
None
[edit]
Related Methods and Objects
[edit]
Examples
This example will
function StopBubbling( evt )
{
// get the immediate target of this event
var firstTarget = evt.target;
// stop all other targets with event listeners from
// triggering this event
evt.stopPropagation();
}
[edit]
Implementation Support
[edit]
