HTML element.

interface Element {
    children: ElementContent[];
    content?: Root;
    data?: ElementData;
    position?: Position;
    properties: Properties;
    tagName: string;
    type: "element";
}

Hierarchy (view full)

Properties

children: ElementContent[]

Children of element.

content?: Root

When the tagName field is 'template', a content field can be present.

Data associated with the element.

position?: Position

Position of a node in a source document.

Nodes that are generated (not in the original source document) must not have a position.

properties: Properties

Info associated with the element.

tagName: string

Tag name (such as 'body') of the element.

type: "element"

Node type of elements.