Constructor
new BEMQuery(query, context, converter, selectorEngine)
- Source:
Creates elements collection.
Parameters:
Name | Type | Description |
---|---|---|
query |
String | Iterable | HTMLElement | Selector or existing elements collection upon which the new elements collection should be created. |
context |
Document | HTMLElement | BEMQuery | Context from which elements should be fetched. |
converter |
Converter | BEM selector converter to be used. |
selectorEngine |
SelectorEngine | CSS selector engine to be used by the current and descendant `BEMQuery` instances. |
Methods
each(callback) → {BEMQuery}
- Source:
Executes callback on every element in the collection.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Callback to be executed. |
Returns:
Current `BEMQuery` instance.
- Type
- BEMQuery
get(index) → {BEMQuery}
- Source:
Gets element with given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | Element's index. |
Returns:
New BEMQuery instance with fetched element
as an only element in the collection.
- Type
- BEMQuery