From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/htmlslotelement/index.html | 103 +++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 files/zh-cn/web/api/htmlslotelement/index.html (limited to 'files/zh-cn/web/api/htmlslotelement/index.html') diff --git a/files/zh-cn/web/api/htmlslotelement/index.html b/files/zh-cn/web/api/htmlslotelement/index.html new file mode 100644 index 0000000000..6393babe39 --- /dev/null +++ b/files/zh-cn/web/api/htmlslotelement/index.html @@ -0,0 +1,103 @@ +--- +title: HTMLSlotElement +slug: Web/API/HTMLSlotElement +translation_of: Web/API/HTMLSlotElement +--- +

{{SeeCompatTable}}{{APIRef('Web Components')}}

+ +

Shadow DOM API 的接口HTMLSlotElement使其能够访问到HTML元素<slot>的名字和分配的节点

+ +

+

属性

+

+ +
+
{{domxref('HTMLSlotElement.name')}}
+
{{domxref("DOMString")}}: 可以用来设置和获取slot的名字
+
+ +

方法

+ +
+
{{domxref('HTMLSlotElement.assignedNodes()')}}
+
Returns the sequence of elements assigned to this slot, or alternatively the slot's fallback content.
+
+

规范

+
+
+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG','scripting.html#htmlslotelement','HTMLSlotElement')}}{{Spec2('HTML WHATWG')}} 
{{SpecName('Shadow DOM','#the-slot-element','HTMLSlotElement')}}{{Spec2('Shadow DOM')}}Initial definition
+ +

浏览器的兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(53.0)}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidAndroid WebviewFirefox Mobile (Gecko)Firefox OSIE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatNo}}{{CompatChrome(53.0)}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatChrome(53.0)}}
+
-- cgit v1.2.3-54-g00ecf