Firefox Tomorrow

web api interface

HTMLTemplateElement

View on MDN ↗

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

[!NOTE] An HTML parser can create either an HTMLTemplateElement or a ShadowRoot when it parses a <template> element, depending on the <template> attributes. If an HTMLTemplateElement is created the “shadow” attributes are reflected from the template. However these are not useful, because an HTMLTemplateElement is not a shadow root and cannot subsequently be changed to a shadow root.

Instance properties

This interface inherits the properties of HTMLElement.

Instance methods

This interface inherits the methods of HTMLElement.

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.