The node's tag, e.g. "div"
.
Optional
options: CreateOptionsAdditional settings to customize the node creation.
Creates a new HTML node with the given tag.
For example, to create new div and insert it as the last element of parent
:
import { createElement } from "apprt-dom";
const parent = document.body;
const node = createElement("div", {
class: "app",
referenceNode: parent
});
The node's tag, e.g. "div"
.
Optional
options: CreateOptionsAdditional settings to customize the node creation.
Creates a new HTML node with the given tag.
For example, to create new div and insert it as the last element of
parent
: