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/htmltemplateelement/index.html | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 files/zh-cn/web/api/htmltemplateelement/index.html (limited to 'files/zh-cn/web/api/htmltemplateelement/index.html') diff --git a/files/zh-cn/web/api/htmltemplateelement/index.html b/files/zh-cn/web/api/htmltemplateelement/index.html new file mode 100644 index 0000000000..4a5f41718f --- /dev/null +++ b/files/zh-cn/web/api/htmltemplateelement/index.html @@ -0,0 +1,51 @@ +--- +title: HTMLTemplateElement +slug: Web/API/HTMLTemplateElement +translation_of: Web/API/HTMLTemplateElement +--- +
{{APIRef("Web Components")}}
+ +

可以使用HTMLTemplateElement 接口来访问 HTML {{HTMLElement("template")}}元素的内容。

+ +

{{InheritanceDiagram(600, 120)}}

+ +

属性

+ +

这个接口继承了 {{domxref("HTMLElement")}}的属性

+ +
+
{{domxref("HTMLTemplateElement.content")}}{{readonlyinline}}
+
{{domxref("DocumentFragment")}}对象,包裹了模板元素{{HTMLElement("template")}}的内容。这个属性是只读的DOM树。
+
+ +

Methods

+ +

这个接口继承了 {{domxref("HTMLElement")}}的方法。

+ +

标准

+ + + + + + + + + + + + + + + + + + + +
标准状态备注
{{SpecName('HTML WHATWG','scripting.html#htmltemplateelement','HTMLTemplateElement interface')}}{{Spec2('HTML WHATWG')}}
{{SpecName('HTML5 W3C','scripting-1.html#htmltemplateelement','HTMLTemplateElement interface')}}{{Spec2('HTML5 W3C')}}Initial definition
+ +

浏览器兼容性

+ + + +

{{Compat("api.HTMLTemplateElement")}}

-- cgit v1.2.3-54-g00ecf