Constructor
new module:br-services /html /BRHtml Resource Service(url)
Parameters:
Name | Type | Description |
---|---|---|
url |
String | A URL to load HTML from. |
- Implements:
Methods
get HTMLTemplate()
- Implements:
- Deprecated:
- as this method has now been renamed to #getTemplateElement.
get Template Element(template Id) → {HTMLElement}
Retrieve a given template as an element — only singly rooted templates can be retrieved this way.
Parameters:
Name | Type | Description |
---|---|---|
templateId |
String | The identifier of the template you wish to retrieve. |
Throws:
RangeError if the template contains more than one root node.
Returns:
- Type
- HTMLElement
get Template Fragment(template Id) → {DocumentFr agment}
Retrieve a given template as a document-fragment.
Parameters:
Name | Type | Description |
---|---|---|
templateId |
String | The identifier of the template you wish to retrieve. |
Returns:
- Type
-
Document
Fragment