HTMLTemplateElement

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!
您也可以阅读此文章的English (US)版。

The HTMLTemplateElement interface enables access to the contents of an HTML <template> element.

Properties

This interface inherits the properties of HTMLElement.

HTMLTemplateElement.contentRead only
DocumentFragment: Returns the <template> element's template contents.

Methods

This interface inherits the methods of HTMLElement.

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'HTMLTemplateElement interface' in that specification.
Living Standard  
HTML5
The definition of 'HTMLTemplateElement interface' in that specification.
Recommendation Initial definition

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 26 13 22 (22) No support 15 7.1
Feature Android Edge Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support ? (Yes) ? No support ? iOS 8

文档标签和贡献者