map.apps Bundle APIs 4.20.0
    Preparing search index...

    Function insertElement

    • Inserts a node at the specified position relative to a another node.

      For example, to insert a node as the last element of parent:

      import { insertElement } from "apprt-dom";
      const node = ...;
      const parent = document.body;
      insertElement(node, {
      referenceNode: parent,
      position: "last"
      });

      Parameters

      • node: HTMLElement

        a html node

      • options: NodePosition

        the position options

      Returns void