Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Template

Class to parse a template result returned from html..., and attach everything And can do some patches on it according to newly rendered template result.

Hierarchy

  • Template

Index

Constructors

constructor

Methods

appendTo

  • appendTo(target: string | Element): void
  • Append all nodes into target element or selector.

    Parameters

    • target: string | Element

      The target element where will append to.

    Returns void

before

  • Insert all the nodes in specified template before start node of current template.

    Parameters

    Returns void

canMergeWith

extractToFragment

  • extractToFragment(): DocumentFragment
  • Extract all nodes into a fragment. You must insert the extracted fragment into a container soon. Used to get just parsed fragment, or reuse template nodes.

    Returns DocumentFragment

getFirstElement

  • getFirstElement(): null | HTMLElement

getNodes

  • getNodes(): ChildNode[]

merge

movesOut

  • movesOut(): void
  • Moves all nodes out from parent container, and cache into a new fragment in order to use them later.

    Returns void

preRender

  • preRender(): void
  • Initialize components inside a template and update it immediately. Elements are not connected but will be pre rendered.

    Returns void

remove

  • remove(): void

replaceWith

  • Replace all the nodes in current template with the nodes of specified template.

    Parameters

    Returns void

Generated using TypeDoc