Class: Divider

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

el

Get the component's top level DOM node.

Overrides:
Source:

language

Get the language attribute.

Overrides:
Source:

parent

Get the parent attribute. Parent is set when DomComponent instances are mounted.

Overrides:
Source:

theme

Get the theme attribute.

Overrides:
Source:

Methods

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