Class HTMLTemplateElement
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The HTMLTemplateElement interface enables access to the contents of an HTML template element.
[Value("HTMLTemplateElement")]
public class HTMLTemplateElement : HTMLElement
- Inheritance
-
HTMLTemplateElement
- Inherited Members
Remarks
NOTE
An HTML parser can create either an
HTMLTemplateElementor a ShadowRoot when it parses a {{HTMLElement("template")}} element, depending on the<template>attributes.
If anHTMLTemplateElementis created the "shadow" attributes are reflected from the template.
However these are not useful, because anHTMLTemplateElementis not a shadow root and cannot subsequently be changed to a shadow root.
Constructors
HTMLTemplateElement()
public HTMLTemplateElement()
Properties
Content
The HTMLTemplateElement.content property returns a<template> element's template contents (a
DocumentFragment).
[Value("content")]
public DocumentFragment Content { get; }
Property Value
Remarks
ShadowRootClonable
The shadowRootClonable property reflects the value of the shadowrootclonable attribute of the associated <template> element.
[Value("shadowRootClonable")]
public bool ShadowRootClonable { get; set; }
Property Value
- bool
Reflects the value of the
shadowrootclonableattribute of the associated<template>element.
Remarks
Note that this property is not useful for developers.
If a <template> element is used to declaratively create a ShadowRoot, then this object and property do not exist.
Otherwise, if an HTMLTemplateElement is created, the value of this property is irrelevant because the object is not a shadow root and cannot subsequently be changed to a shadow root.
-shadowrootclonable attribute of the <template> element
-ShadowRoot.clonable
ShadowRootDelegatesFocus
The shadowRootDelegatesFocus property of the HTMLTemplateElement interface reflects the value of the shadowrootdelegatesfocus attribute of the associated <template> element.
[Value("shadowRootDelegatesFocus")]
public bool ShadowRootDelegatesFocus { get; set; }
Property Value
- bool
Reflects the value of the
shadowrootdelegatesfocusattribute of the associated<template>element.
Remarks
Note that this property is not useful for developers.
If a <template> element is used to declaratively create a ShadowRoot, then this object and property do not exist.
Otherwise, if an HTMLTemplateElement is created, the value of this property is irrelevant because the object is not a shadow root and cannot subsequently be changed to a shadow root.
-shadowrootdelegatesfocus attribute of the <template> element
-ShadowRoot.delegatesFocus
ShadowRootMode
The shadowRootMode property of the HTMLTemplateElement interface reflects the value of the shadowrootmode attribute of the associated <template> element.
[Value("shadowRootMode")]
public string ShadowRootMode { get; set; }
Property Value
- string
Reflects the value of the
shadowrootmodeattribute of the associated<template>element.
Remarks
Note that this property is not useful for developers.
If a <template> element is used to declaratively create a ShadowRoot, then this object and property do not exist.
Otherwise, if an HTMLTemplateElement is created, the value of this property is irrelevant because the object is not a shadow root and cannot subsequently be changed to a shadow root.
-shadowrootmode attribute of the <template> element
-ShadowRoot.mode
ShadowRootSerializable
The shadowRootSerializable property reflects the value of the shadowrootserializable attribute of the associated <template> element.
[Value("shadowRootSerializable")]
public bool ShadowRootSerializable { get; set; }
Property Value
- bool
Reflects the value of the
shadowrootserializableattribute of the associated<template>element.
Remarks
Note that this property is not useful for developers.
If a <template> element is used to declaratively create a ShadowRoot, then this object and property do not exist.
Otherwise, if an HTMLTemplateElement is created, the value of this property is irrelevant because the object is not a shadow root and cannot subsequently be changed to a shadow root.
-shadowrootserializable attribute of the <template> element
-ShadowRoot.serializable