vibe.d beta banner
get vibe.d
0.7.30

Class Node

Represents a single node in the DOM tree.

Inherits from

  • Object (base class)

Constructors

Name Description
this Constructs a new node.

Fields

Name Type Description
attribs NodeAttribs Flags that control the parser and generator behavior.
attributes Attribute[] A key-value set of attributes.
contents NodeContent[] The main contents of the node.
loc Location Start location of the node in the source file.
name string Name of the node

Properties

Name Type Description
class_ [get] inout(Attribute) Returns "class" attribute - a white space separated list of style class identifiers.
id [get] inout(Attribute) Returns the "id" attribute.

Methods

Name Description
addText Adds a piece of text to the node's contents.
getAttribute Returns a given named attribute.
isProceduralTextNode Tests if the node consists only of text and interpolations, but doesn't contain child nodes.
isTextNode Tests if the node consists of only a single, static string.
opEquals Compares all properties of two nodes for equality.
opEquals
setAttribute
stripIfOnlyWhitespace Removes all content if it conists of only white space.
stripLeadingWhitespace Strips any leading whitespace from the contents.
stripTrailingWhitespace Strips any trailign whitespace from the contents.
toString Outputs a simple string representation of the node.

Enums

Name Description
SpecialName A set of names that identify special-purpose nodes
Authors
Copyright
License