--- title: HTMLContentElement slug: Web/API/HTMLContentElement tags: - API - DOM - 参考 - 接口 translation_of: Web/API/HTMLContentElement --- <p>{{ APIRef("Web Components") }}</p> <p>{{Deprecated_header}}</p> <p><code><strong>HTMLContentElement</strong></code> 接口表示一个 HTML {{HTMLElement("content")}} 元素。<code><content></code> 元素曾被用于 <a href="/zh-CN/docs/Web/Web_Components/Shadow_DOM">Shadow DOM</a>。</p> <h2 id="Properties" name="Properties">属性</h2> <p><em>此接口继承 {{domxref("HTMLElement")}} 接口的属性。</em></p> <dl> <dt>{{domxref("HTMLContentElement.select")}}</dt> <dd>Is a {{domxref("DOMString")}} that reflects the {{ htmlattrxref("select", "content") }} HTML attribute. The value is a comma-separated list of CSS selectors that select the content to insert in place of the <code><content></code> element.</dd> </dl> <h2 id="方法">方法</h2> <p><em>此接口继承 {{domxref("HTMLElement")}} 接口的方法。</em></p> <dl> <dt>{{domxref("HTMLContentElement.getDistributedNodes()")}}</dt> <dd>Returns a static {{domxref("NodeList")}} of the {{glossary("distributed nodes")}} associated with this <code><content></code> element. </dd> </dl> <h2 id="规范">规范</h2> <p>此特性不再存在于任何标准中。</p> <h2 id="浏览器兼容性">浏览器兼容性</h2> <p>{{Compat("api.HTMLContentElement")}}</p> <h2 id="参见">参见</h2> <ul> <li>实现了此接口的 HTML {{HTMLElement("content")}} 元素。</li> <li><a href="/zh-CN/docs/Web/Web_Components/Shadow_DOM">Shadow DOM</a></li> </ul> <dl> <dt></dt> </dl>