Class: Node

Node~ Node

new Node(bemjson)

Модуль работы с БЭМ-узлом.
Parameters:
Name Type Description
bemjson object BEMJSON узла
Source:

Members

(static) bemAttr :string

Имя атрибута для хранения параметров инициализации.
Type:
  • string
Source:

(static) bemClass :string

Имя класса для js-инициализации.
Type:
  • string
Source:

Methods

(static) resolveOptionEscape(escape, escape.contentopt, escape.attrsopt) → {object}

Получить/установить опции экранирования.
Parameters:
Name Type Description
escape boolean | object Флаг экранирования спецсимволов
Properties
Name Type Attributes Description
content boolean <optional>
Флаг экранирования содержимого
attrs boolean <optional>
Флаг экранирования значений атрибутов
Source:
Returns:
Type
object

bemjson(bemjsonopt) → {object|Node}

Получить/установить BEMJSON узла.
Parameters:
Name Type Attributes Description
bemjson object <optional>
BEMJSON
Source:
Returns:
Type
object | Node

content(contentopt) → {*|Node}

Получить/установить содержимое узла.
Parameters:
Name Type Attributes Description
content * <optional>
Содержимое
Source:
Returns:
Type
* | Node

getClass() → {Array.<string>}

Получить список классов узла.
Source:
Returns:
Type
Array.<string>

getMix() → {array}

Получить информацию о примиксованных сущностях.
Source:
Returns:
Type
array

getName() → {Selector}

Получить экземпляр имени базовой БЭМ-сущности. Это может быть блок или элемент блока.
Source:
Returns:
Type
Selector

getParams() → {object}

Получить параметры узла.
Source:
Returns:
Type
object

isBlock() → {boolean}

Проверить узел на блок.
Source:
Returns:
Type
boolean

isElem() → {boolean}

Проверить узел на элемент.
Source:
Returns:
Type
boolean

toString() → {string}

Получить строковое представление узла.
Source:
Returns:
Type
string