Skip to content

BemDomEntity. Static method for init entity on dom (v4-5) #1596

@belozer

Description

@belozer

static method: findOn

findOn(node: BemDomEntity|Element|NodeList|HTMLCollection): ?BemDomEntity

example
Link.findOn(domNodes);
Link.findOn(this._elem('link'));

current
bemDom.getEntity(domNodes, Link);
this._elem('link').findMixedBlock(Link);

From history v3 and old versions
this.findBlockOn('link', 'link');

@veged @tadatuta

upd
Example with _events

this._events(Button);
this._events(Button.findOn(this._elem('add-address')));

vs
this._events(Button);
this._events(this._elem('add-address').findMixedBlock(Button));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions