--- title: HTMLContentElement slug: Web/API/HTMLContentElement tags: - Necesita traducción translation_of: Web/API/HTMLContentElement ---

{{ APIRef("Web Components") }}

{{Deprecated_header}}

The HTMLContentElement interface represents a {{HTMLElement("content")}} HTML Element, which is used in Shadow DOM

Properties

This interface inherits the properties of {{domxref("HTMLElement")}}.

{{domxref("HTMLContentElement.select")}}
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 <content> element.

Methods

This interface inherits the methods of {{domxref("HTMLElement")}}.

{{domxref("HTMLContentElement.getDistributedNodes()")}}
Returns a static {{domxref("NodeList")}} of the {{glossary("distributed nodes")}} associated with this <content> element. 

Specifications

Specification Status Comment
{{SpecName('Shadow DOM', '#the-content-element', 'content')}} {{Spec2('Shadow DOM')}}  

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 35 {{CompatGeckoDesktop("28")}} [1] {{CompatNo}} 26 {{CompatNo}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 37 {{CompatGeckoMobile("28")}} [1] {{CompatNo}} {{CompatUnknown}} {{CompatUnknown}}

[1] If Shadow DOM is not enabled in Firefox, <content> elements will behave like {{domxref("HTMLUnknownElement")}}. Shadow DOM was first implemented in Firefox 28 and is behind a preference, dom.webcomponents.enabled, which is disabled by default.

See also