弃用
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the
兼容性表格
at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
HTMLContentElement
接口表示
<content>
HTML Element, which is used in
Shadow DOM
.
This interface inherits the properties of
HTMLElement
.
HTMLContentElement.select
DOMString
that reflects the
select
HTML attribute. The value is a comma-separated list of CSS selectors that select the content to insert in place of the
<content>
元素。
This interface inherits the methods of
HTMLElement
.
HTMLContentElement.getDistributedNodes()
NodeList
的
distributed nodes
associated with this
<content>
元素。
This feature is no longer defined by any standards.
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
HTMLContentElement
弃用
非标
|
Chrome 35 | Edge ≤79 |
Firefox
28 — 59
Disabled
|
IE No | Opera 26 | Safari No | WebView Android 37 | Chrome Android 37 |
Firefox Android
28 — 59
Disabled
|
Opera Android 26 | Safari iOS ? | Samsung Internet Android 3.0 |
getDistributedNodes
弃用
非标
|
Chrome 35 | Edge ≤79 |
Firefox
28 — 59
Disabled
|
IE No | Opera 26 | Safari No | WebView Android 37 | Chrome Android 37 |
Firefox Android
28 — 59
Disabled
|
Opera Android 26 | Safari iOS ? | Samsung Internet Android 3.0 |
select
弃用
非标
|
Chrome 35 | Edge ≤79 |
Firefox
28 — 59
Disabled
|
IE No | Opera 26 | Safari No | WebView Android 37 | Chrome Android 37 |
Firefox Android
28 — 59
Disabled
|
Opera Android 26 | Safari iOS ? | Samsung Internet Android 3.0 |
完整支持
不支持
兼容性未知
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
用户必须明确启用此特征。
<content>
HTML element, implementing this interface.