Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Dom

Hierarchy

  • Dom

Index

Methods

append

  • Appends a new child node to the DOM which is generated from a VNode. This is a low-level method. Users will typically use a Projector instead.

    Parameters

    • parentNode: Element

      The parent node for the new child node.

    • vnode: VNode

      The root of the virtual DOM tree that was created using the h function. NOTE: VNode objects may only be rendered once.

    • Optional projectionOptions: ProjectionOptions

      Options to be used to create and update the Projection.

    Returns Projection

    The Projection that was created.

create

  • Creates a real DOM tree from vnode. The Projection object returned will contain the resulting DOM Node in its domNode property. This is a low-level method. Users will typically use a Projector instead.

    Parameters

    • vnode: VNode

      The root of the virtual DOM tree that was created using the h function. NOTE: VNode objects may only be rendered once.

    • Optional projectionOptions: ProjectionOptions

      Options to be used to create and update the projection.

    Returns Projection

    The Projection which also contains the DOM Node that was created.

insertBefore

  • Inserts a new DOM node which is generated from a VNode. This is a low-level method. Users wil typically use a Projector instead.

    Parameters

    • beforeNode: Element

      The node that the DOM Node is inserted before.

    • vnode: VNode

      The root of the virtual DOM tree that was created using the h function. NOTE: VNode objects may only be rendered once.

    • Optional projectionOptions: ProjectionOptions

      Options to be used to create and update the projection, see createProjector.

    Returns Projection

    The Projection that was created.

merge

  • Merges a new DOM node which is generated from a VNode with an existing DOM Node. This means that the virtual DOM and the real DOM will have one overlapping element. Therefore the selector for the root VNode will be ignored, but its properties and children will be applied to the Element provided. This is a low-level method. Users wil typically use a Projector instead.

    Parameters

    • element: Element

      The existing element to adopt as the root of the new virtual DOM. Existing attributes and child nodes are preserved.

    • vnode: VNode

      The root of the virtual DOM tree that was created using the h function. NOTE: VNode objects may only be rendered once.

    • Optional projectionOptions: ProjectionOptions

      Options to be used to create and update the projection, see createProjector.

    Returns Projection

    The Projection that was created.

replace

  • Replaces an existing DOM node with a node generated from a VNode. This is a low-level method. Users will typically use a Projector instead.

    Parameters

    • element: Element

      The node for the VNode to replace.

    • vnode: VNode

      The root of the virtual DOM tree that was created using the h function. NOTE: VNode objects may only be rendered once.

    • Optional projectionOptions: ProjectionOptions

      Options to be used to create and update the Projection.

    Returns Projection

    The Projection that was created.

Generated using TypeDoc