Divider(attributesopt)

new Divider(attributesopt)

Create a new Divider instance.

The purpose of this class is to return a unique class name so the theme can render it appropriately, since each DomComponent can receive its own template from the theme.

Parameters:
Name Type Attributes Description
attributes object | undefined <optional>

The instance attributes.

Source:

Extends

Members

className :string

The className attribute. Used for CSS.

Type:
  • string
Inherited From:
Source:

el :HTMLElement

The el attribute.

Type:
  • HTMLElement
Inherited From:
Source:

language :object

Get the language attribute.

Type:
  • object
Inherited From:
Source:

parent :DomComponent

The parent attribute. Parent is set when DomComponent instances are mounted.

Type:
Inherited From:
Source:

theme :object

The theme attribute.

Type:
  • object
Inherited From:
Source:

Methods

(static) defineName() → {string}

Define the name of the class.

Source:
Returns:
Type
string

mount(parent, beforeopt) → {HTMLElement}

Mount a DOM component to a parent node.

Parameters:
Name Type Attributes Default Description
parent HTMLElement

The parent DOM node.

before false | HTMLElement <optional>
false

If false, element is appended to the parent node. If an instance of an HTMLElement, the component will be inserted before the specified element.

Inherited From:
Source:
Returns:
  • The el attribute.
Type
HTMLElement

render() → {HTMLElement}

Render the DOM component.

Inherited From:
Source:
Returns:
  • The el attribute.
Type
HTMLElement

translate(string) → {string}

Translate a string.

Parameters:
Name Type Description
string string

The string to translate.

Inherited From:
Source:
Returns:
  • The translated string. If no tranlation found, the untranslated string is returned.
Type
string