Block

Wrapper around a block element. Default implementation is a div.

class Block : Element (
TElement = Element
) if (
is(BaseClassesTuple!TElement == AliasSeq!(Element, Object)) ||
is(TElement == Element)
) {}

Constructors

this
this()

Creates a new block element.

this
this(string tagName)

Creates a new block element.

Members

Functions

addElement
void addElement(TElement element)

Adds an element to the block.

generateHtml
string generateHtml()

Generates the appropriate html for the element.

Inherited Members

From Element

generateHtml
string generateHtml()

Generates the appropriate html for the element.

tagName
string tagName [@property getter]

Gets the tag name.

inner
string inner [@property getter]

Gets the inner text representation.

inner
string inner [@property setter]

Sets the inner text representation.

id
string id [@property getter]

Gets the id of the element.

id
string id [@property setter]

Sets the id of the element.

name
string name [@property getter]

Gets the name of the element.

name
string name [@property setter]

Sets the name of the element.

addAttribute
void addAttribute(string name, T value)

Adds an attribute to the html element.

getAttribute
T getAttribute(string name, T defaultValue)

Gets an attribute from the html element.

toString
string toString()

Gets the html representation of the element.

attributeHtml
string attributeHtml()

Gets the attribute html.

Meta