Interface Dom

Hierarchy

  • Dom

Methods

  • 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.

    Returns

    The [[Projection]] that was created.

    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

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

    Returns

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

    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

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

    Returns

    The [[Projection]] that was created.

    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

  • 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.

    Returns

    The [[Projection]] that was created.

    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

  • 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.

    Returns

    The [[Projection]] that was created.

    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

Generated using TypeDoc