Event: bubbles プロパティ

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

メモ: この機能はウェブワーカー内で利用可能です。

bubblesEvent インターフェイスの読み取り専用プロパティで、イベントが DOM ツリーをバブリングするかしないかを示します。

メモ: バブリングについての詳細は、イベントのバブリングを参照してください。

論理値で、このイベントが DOM ツリーをバブリングするのであれば true です。

js
function handleInput(e) {
  // バブリングするイベントを渡すかどうかをチェック
  if (!e.bubbles) {
    passItOn(e);
  }

  // 既にバブリングした
  doOutput(e);
}

仕様書

Specification
DOM
# ref-for-dom-event-bubbles③

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
bubbles

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
See implementation notes.

関連情報

  • stopPropagation() はイベントのバブリングを停止します
  • stopImmediatePropagation() は同じイベントが DOM 内の同じ水準で他のリスナーを呼び出すことを抑止します
  • preventDefault() は拡散を続けることを許可しますが、ブラウザーがイベントを扱うためのリスナーがない既定のアクションを実行することを許可しません