maquette
    Preparing search index...

    Interface Dom

    interface Dom {
        append(
            parentNode: Element,
            vnode: VNode,
            projectionOptions?: ProjectionOptions,
        ): Projection;
        create(vnode: VNode, projectionOptions?: ProjectionOptions): Projection;
        insertBefore(
            beforeNode: Element,
            vnode: VNode,
            projectionOptions?: ProjectionOptions,
        ): Projection;
        merge(
            element: Element,
            vnode: VNode,
            projectionOptions?: ProjectionOptions,
        ): Projection;
        replace(
            element: Element,
            vnode: VNode,
            projectionOptions?: ProjectionOptions,
        ): Projection;
    }
    Index

    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.

      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.

      • OptionalprojectionOptions: ProjectionOptions

        Options to be used to create and update the Projection.

      Returns Projection

      The Projection that was created.

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

      • OptionalprojectionOptions: ProjectionOptions

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

      Returns Projection

      The Projection that was created.

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

      • OptionalprojectionOptions: ProjectionOptions

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

      Returns Projection

      The Projection that was created.