aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/api/event/bubbles/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-tw/web/api/event/bubbles/index.html')
-rw-r--r--files/zh-tw/web/api/event/bubbles/index.html63
1 files changed, 63 insertions, 0 deletions
diff --git a/files/zh-tw/web/api/event/bubbles/index.html b/files/zh-tw/web/api/event/bubbles/index.html
new file mode 100644
index 0000000000..4a495fc672
--- /dev/null
+++ b/files/zh-tw/web/api/event/bubbles/index.html
@@ -0,0 +1,63 @@
+---
+title: Event.bubbles
+slug: Web/API/Event/bubbles
+translation_of: Web/API/Event/bubbles
+---
+<p>{{ ApiRef("DOM") }}</p>
+
+<h3 id="Summary" name="Summary">概述</h3>
+
+<p>表示事件是否會向上冒泡傳遞。</p>
+
+<h3 id="語法">語法</h3>
+
+<pre class="eval"><em>var bool</em> = event.bubbles;
+</pre>
+
+<p>回傳一個布林值,若事件會向上冒泡傳遞則回傳 <code>true</code>。</p>
+
+<h3 id="Notes" name="Notes">備註</h3>
+
+<p>Only certain events can bubble. Events that do bubble have this property set to <code>true</code>. You can use this property to check if an event is allowed to bubble or not.</p>
+
+<h3 id="Example" name="Example">範例</h3>
+
+<pre class="brush: js"> function goInput(e) {
+ // checks bubbles and
+ if (!e.bubbles) {
+ // passes event along if it's not
+ passItOn(e);
+ }
+ // already bubbling
+ doOutput(e)
+}
+</pre>
+
+<h2 id="Specifications" name="Specifications">規範</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('DOM WHATWG', '#dom-event-bubbles', 'Event.bubbles')}}</td>
+ <td>{{ Spec2('DOM WHATWG') }}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM4', '#dom-event-bubbles', 'Event.bubbles')}}</td>
+ <td>{{ Spec2('DOM4') }}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM2 Events', '#Events-Event-canBubble', 'Event.bubbles')}}</td>
+ <td>{{ Spec2('DOM2 Events') }}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>