Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
belozer opened this issue Aug 8, 2018 · 0 comments
Open

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

belozer opened this issue Aug 8, 2018 · 0 comments

Comments

@belozer
Copy link
Member

belozer commented Aug 8, 2018

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));

@belozer belozer changed the title BemDomEntity. Static method for init entity on dom (v5) BemDomEntity. Static method for init entity on dom (v4-5) Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant