EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

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

JavaScript

p = object.cancelBubble

 

Property values

Type: Boolean

true (true)

Stop the event from propagating to the parent.

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 cancelBubble property has no effect. For example, the onclick event bubbles and you can cancel it, but the onfocus event does not.

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

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

See also

BeforeUnloadEvent
CompositionEvent
CustomEvent
DragEvent
Event
FocusEvent
KeyboardEvent
MessageEvent
MouseEvent
MouseWheelEvent
MSSiteModeEvent
MutationEvent
StorageEvent
SVGZoomEvent
TextEvent
UIEvent

 

 

Afficher:
© 2014 Microsoft