Element
An element within the DOM.
class Element extends NodeWithChildren {}
constructor(
name: string,
attribs: {},
[name: string]: string;
children?: Node[],
type?: ElementType.Tag | ElementType.Script | ElementType.Style,
);attribs: {};
[name: string]: string;
name: string;
namespace?: string;
sourceCodeLocation?: TagSourceCodeLocation | null;
get tagName(): string;
set tagName(name: string);
get attributes(): Attribute[];
x-attribsNamespace?: Record<string, string>;
x-attribsPrefix?: Record<string, string>;
§Constructors
§
new Element(name: string, attribs: {}, children?: Node[], type?: ElementType.Tag | ElementType.Script | ElementType.Style)
[src][name: string]: string;
@param name
Name of the tag, eg. div
, span
.
@param attribs
Object mapping attribute names to attribute values.
@param children
Children of the node.