From 310fd066e91f454b990372ffa30e803cc8120975 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:56:40 +0100 Subject: unslug zh-cn: move --- files/zh-cn/web/api/event/cancelbubble/index.html | 93 ++++++++++++++++++++++ files/zh-cn/web/api/event/createevent/index.html | 35 -------- files/zh-cn/web/api/event/deeppath/index.html | 90 --------------------- .../index.html" | 93 ---------------------- 4 files changed, 93 insertions(+), 218 deletions(-) create mode 100644 files/zh-cn/web/api/event/cancelbubble/index.html delete mode 100644 files/zh-cn/web/api/event/createevent/index.html delete mode 100644 files/zh-cn/web/api/event/deeppath/index.html delete mode 100644 "files/zh-cn/web/api/event/\347\246\201\347\224\250\346\227\266\351\227\264\345\206\222\346\263\241/index.html" (limited to 'files/zh-cn/web/api/event') diff --git a/files/zh-cn/web/api/event/cancelbubble/index.html b/files/zh-cn/web/api/event/cancelbubble/index.html new file mode 100644 index 0000000000..c228d329d6 --- /dev/null +++ b/files/zh-cn/web/api/event/cancelbubble/index.html @@ -0,0 +1,93 @@ +--- +title: Event.cancelBubble +slug: Web/API/Event/禁用时间冒泡 +tags: + - 事件 +translation_of: Web/API/Event/cancelBubble +--- +

{{APIRef("DOM Events")}} 

+ +

Event.cancelBubble 属性是 {{domxref("Event.stopPropagation()")}}的一个曾用名。在从事件处理程序返回之前将其值设置为true可阻止事件的传播。

+ +

语法

+ +
event.cancelBubble = bool;
+let bool = event.cancelBubble;
+ +

用例

+ +
+
+
ele.onclick = function(e) {
+  // 在这儿可以做点儿有趣的事情
+  e.cancelBubble = true;
+}
+
+
+ +

规范

+ +

这个属性的规范并未统一. 因为他还有其他标准 W3C版: an old Working Draft of W3C DOM Level 2. 微软版: description of it on MSDN.

+ +

浏览器兼容

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureFirefox (Gecko)ChromeEdgeInternet ExplorerMicrosoft EdgeOperaSafari
Basic support{{ CompatNo() }}{{ CompatVersionUnknown() }}{{CompatVersionUnknown}}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureFirefox Mobile (Gecko)AndroidEdgeIE MobileOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{ CompatUnknown() }}{{CompatVersionUnknown}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +

参考

+ + diff --git a/files/zh-cn/web/api/event/createevent/index.html b/files/zh-cn/web/api/event/createevent/index.html deleted file mode 100644 index 8b9c249c71..0000000000 --- a/files/zh-cn/web/api/event/createevent/index.html +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: Event.createEvent() -slug: Web/API/Event/createEvent -tags: - - DOM - - Event - - JavaScript - - Method -translation_of: Web/API/Document/createEvent -translation_of_original: Web/API/Event/createEvent ---- -

{{APIRef("DOM")}}

- -

创建一个新的事件(Event),随之必须调用自身的 init 方法进行初始化。

- -

语法

- -
document.createEvent(type) 
- -
-
type
-
指明待创建事件对象的类型的字符串
-
- -

此方法返回一个新的特定类型的 DOM {{ domxref("Event") }} 对象,此对象在使用前必须经过初始化(init)。

- -

示例

- -
var newEvent = document.createEvent("UIEvents");
- -

规范

- - diff --git a/files/zh-cn/web/api/event/deeppath/index.html b/files/zh-cn/web/api/event/deeppath/index.html deleted file mode 100644 index 61bfdf1366..0000000000 --- a/files/zh-cn/web/api/event/deeppath/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Event.deepPath -slug: Web/API/Event/deepPath -translation_of: Web/API/Event/composedPath -translation_of_original: Web/API/Event/deepPath ---- -

{{SeeCompatTable}}{{APIRef("Shadow DOM")}}

- -

{{domxref("Event")}}的deepPath 属性返回事件冒泡过程所有经过的节点所构成的{{jsxref("Array")}}数组

- -

语法

- -
var nodes[] = Event.deepPath
- -

返回值

- -

一组节点 构成的{{jsxref("Array")}}数组

- -

规范

- - - - - - - - - - - - - - -
规格状态评语
{{SpecName('Shadow DOM','#widl-Event-deepPath-sequence-EventTarget','deepPath')}}{{Spec2('Shadow DOM')}}Initial definition.
- -

浏览器兼容性

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(53.0)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidAndroid WebviewFirefox Mobile (Gecko)Firefox OSIE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatNo}}{{CompatChrome(53.0)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatChrome(53.0)}}
-
diff --git "a/files/zh-cn/web/api/event/\347\246\201\347\224\250\346\227\266\351\227\264\345\206\222\346\263\241/index.html" "b/files/zh-cn/web/api/event/\347\246\201\347\224\250\346\227\266\351\227\264\345\206\222\346\263\241/index.html" deleted file mode 100644 index c228d329d6..0000000000 --- "a/files/zh-cn/web/api/event/\347\246\201\347\224\250\346\227\266\351\227\264\345\206\222\346\263\241/index.html" +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Event.cancelBubble -slug: Web/API/Event/禁用时间冒泡 -tags: - - 事件 -translation_of: Web/API/Event/cancelBubble ---- -

{{APIRef("DOM Events")}} 

- -

Event.cancelBubble 属性是 {{domxref("Event.stopPropagation()")}}的一个曾用名。在从事件处理程序返回之前将其值设置为true可阻止事件的传播。

- -

语法

- -
event.cancelBubble = bool;
-let bool = event.cancelBubble;
- -

用例

- -
-
-
ele.onclick = function(e) {
-  // 在这儿可以做点儿有趣的事情
-  e.cancelBubble = true;
-}
-
-
- -

规范

- -

这个属性的规范并未统一. 因为他还有其他标准 W3C版: an old Working Draft of W3C DOM Level 2. 微软版: description of it on MSDN.

- -

浏览器兼容

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox (Gecko)ChromeEdgeInternet ExplorerMicrosoft EdgeOperaSafari
Basic support{{ CompatNo() }}{{ CompatVersionUnknown() }}{{CompatVersionUnknown}}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox Mobile (Gecko)AndroidEdgeIE MobileOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{ CompatUnknown() }}{{CompatVersionUnknown}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
-
- -

参考

- - -- cgit v1.2.3-54-g00ecf