diff options
Diffstat (limited to 'files/ja/web/api/event/cancelbubble')
-rw-r--r-- | files/ja/web/api/event/cancelbubble/index.html | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/files/ja/web/api/event/cancelbubble/index.html b/files/ja/web/api/event/cancelbubble/index.html new file mode 100644 index 0000000000..98d484871a --- /dev/null +++ b/files/ja/web/api/event/cancelbubble/index.html @@ -0,0 +1,89 @@ +--- +title: Event.cancelBubble +slug: Web/API/Event/cancelBubble +translation_of: Web/API/Event/cancelBubble +--- +<p>{{APIRef("DOM Events")}}</p> + +<p>The <code><strong>Event.cancelBubble</strong></code> property は過去の経緯上、{{domxref("Event.stopPropagation()")}}の別名です。トリガーとしたevent handlerから終了する前に、これに<code>true</code>に設定すると、発生イベントを親要素に伝播(propagation)させません。</p> + +<h2 id="Syntax" name="Syntax">文法</h2> + +<pre class="syntaxbox">event.cancelBubble = <em>bool;</em> +<em>var bool</em> = event.cancelBubble;</pre> + +<h2 id="使用例">使用例</h2> + +<pre>elem.onclick = function(e) { + // do cool things here + e.cancelBubble = true; +}</pre> + +<h2 id="詳細情報">詳細情報</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">詳細</th> + <th scope="col">ステータス</th> + <th scope="col">備考</th> + </tr> + <tr> + <td>{{SpecName('DOM WHATWG', '#dom-event-cancelbubble', 'cancellBubble')}}</td> + <td>{{Spec2('DOM WHATWG')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="ブラウザ_互換性">ブラウザ 互換性</h2> + +<p>{{CompatibilityTable}}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>特徴</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatGeckoDesktop(53)}}<sup>[1]</sup></td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>特徴</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatGeckoDesktop(53)}}<sup>[1]</sup></td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<p>[1] Firefox 52以前で、このpropertyは{{domxref("UIEvent")}} interfaceで定義されていました。 さらなる詳細はこちら {{bug(1298970)}}を見てください。</p> |