Caplin Trader 4.7.1

Interface: module:br/services/HtmlResourceService

module:br/services/HtmlResourceService

A service that provides access to HTML templates.

Methods

getHTMLTemplate()

Implementations:
  • module:br/services/html/BRHtmlResourceService#getHTMLTemplate
Deprecated:
  • as this method has now been renamed to #getTemplateElement.

    getTemplateElement(templateId) → {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.
    Implementations:
    • module:br/services/html/BRHtmlResourceService#getTemplateElement
    Throws:
    RangeError if the template contains more than one root node.
    Returns:
    Type
    HTMLElement

    getTemplateFragment(templateId) → {DocumentFragment}

    Retrieve a given template as a document-fragment.
    Parameters:
    Name Type Description
    templateId String The identifier of the template you wish to retrieve.
    Implementations:
    • module:br/services/html/BRHtmlResourceService#getTemplateFragment
    Returns:
    Type
    DocumentFragment