Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NodePart

A Part that controls a location within a Node tree. Like a Range, NodePart has start and end locations and can set and update the Nodes between those locations.

NodeParts support several value types: primitives, Nodes, TemplateResults, as well as arrays and iterables of those types.

Hierarchy

  • NodePart

Implements

Index

Constructors

constructor

Properties

_pendingValue

_pendingValue: unknown = undefined

endNode

endNode: Node

options

options: RenderOptions

startNode

startNode: Node

value

value: unknown = undefined

Methods

appendInto

  • appendInto(container: Node): void
  • Appends this part into a container.

    This part must be empty, as its contents are not automatically moved.

    Parameters

    • container: Node

    Returns void

appendIntoPart

  • Appends this part into a parent part.

    This part must be empty, as its contents are not automatically moved.

    Parameters

    Returns void

clear

  • clear(startNode?: Node): void
  • Parameters

    • Default value startNode: Node = this.startNode

    Returns void

commit

  • commit(): void
  • Returns void

insertAfterNode

  • insertAfterNode(ref: Node): void
  • Inserts this part after the ref node (between ref and ref's next sibling). Both ref and its next sibling must be static, unchanging nodes such as those that appear in a literal section of a template.

    This part must be empty, as its contents are not automatically moved.

    Parameters

    • ref: Node

    Returns void

insertAfterPart

  • Inserts this part after the ref part.

    This part must be empty, as its contents are not automatically moved.

    Parameters

    Returns void

setValue

  • setValue(value: unknown): void
  • Parameters

    • value: unknown

    Returns void

Generated using TypeDoc