Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

cancelBubble property

Gets or sets a value that indicates whether an event should be stopped from propagating up from the current target.

Internet Explorer 9

 

Syntax

HRESULT value = object.put_cancelBubble( v);HRESULT value = object.get_cancelBubble(* p);

Property values

Type: VARIANT_BOOL

VARIANT_TRUE (true)

Stop the event from propagating to the parent.

VARIANT_FALSE (false)

Allow the event to propagate upwards.

Standards information

There are no standards that apply here.

Remarks

If an event does not bubble by default, the IDOMEvent::cancelBubble property has no effect. For example, the HTMLFrameSiteEvents::onclick event bubbles and you can cancel it, but the HTMLFrameSiteEvents::onfocus event does not.

Also, you can use IDOMEvent::cancelBubble only to stop events in the bubbling phase. It does not stop events from being captured. For more information, see IDOMEvent::eventPhase.

Note  The IDOMEvent::cancelBubble property is provided for backward compatibility. Use the IDOMEvent::stopPropagation or IDOMEvent::stopImmediatePropagation methods instead.

 

 

Community Additions

ADD
Show:
© 2015 Microsoft