Constructs an nested element.
tag name of the element
The first level of parameters. If this parameter is a string, but it is not an identifier string, then it will be treated a string child and nothing should follow it. If this parameter is a string, and is an identifier string, then it will set the id and classes of the element. If this parameter is an Element, then it will become a child and every following parameter will need to be an Element as well. If this parameter is an Attributes, then it will set the attributes of the element and will need to be followed by either a string (as a child), an Element, or nothing.
The second level of parameters. If this parameter is a string then it will be treated a string child and nothing should follow it. If this parameter is an Element, then it will become a child and every following parameter will need to be an Element as well. If this parameter is an Attributes, then it will set the attributes of the element and will need to be followed by a set of Elements or none.
A set of children elements.
Getting for the HTML returned by the render function.
Appends a child.
either a string or renderable
Appends templates to the existing templates object.
Key-value pairs that map to a template rendered in StringLiteral's
Whether or not to allow appended templates to override existing template properties
Get attributes
Gets the children.
Get element class list
Given an object of attributes, converts attributes into the HTML equivalent list.
Get element id
Get element tag
Renders the internalRender function.
Templates to pass in
Render options
Sets an attribute of the element
Name of the attribute.
The attribute value. Alternatively accepts an array with the form: [condition, string1, string2?] which will use string1 if condition == trye. Otherwise it will use string2 if it exists. If string2 is not defined and condition == false, then the attribute will be omitted.
Sets the attributes
Sets the children.
one or more children
Sets the elements class list.
The new set of classes that the element will get.
Set the ID.
The new id.
Set's the id and classes of the element given an identifier string.
An identifier string. See isIdentifierString for more information.
Set the identifiers.
An identifier string. See isIdentifierString for more information.
Overrides the toString method called by JavaScript when string concatenate occurs
Turn on and off the ability for this element to render
The condition that determines whether or not the element can render.
Sets the templates.
Key-value pairs that map to a template rendered in StringLiteral's
Determines if a string is an identifier string. An identifier string either starts with "#" or "." and specifies a list of identifiers for an element. An example is "#book.col.col-xs-5". There can only be a single id and it must be specified at the beginning. For example: ".col.col-xs-5#book" is not a valid identifier string.
Generated using TypeDoc
The NestableElement class represents elements that have an opening and closing tag.