HTMLTemplateElement
Baseline Widely available *
This feature is well established and works across many devices and browser versions. It’s been available across browsers since November 2015.
* Some parts of this feature may have varying levels of support.
可以使用 HTMLTemplateElement
接口来访问 HTML <template>
元素的内容。
must be a string
属性
这个接口继承了 HTMLElement
的属性。
HTMLTemplateElement.content
只读-
DocumentFragment
对象,包裹了模板元素<template>
的内容。这个属性是只读的 DOM 树。
方法
这个接口继承了 HTMLElement
的方法。
规范
Specification |
---|
HTML # htmltemplateelement |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
HTMLTemplateElement | ||||||||||||
content | ||||||||||||
shadowRootClonable | ||||||||||||
shadowRootDelegatesFocus | ||||||||||||
shadowRootMode | ||||||||||||
shadowRootSerializable |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.