Skip to content

i-bem__dom: afterCurrentEvent should guarantee block existence #549

@narqo

Description

@narqo

It's a common case in our BEMDOM blocks to have a code like this:

// myblock.js
this.afterCurrentEvent(function() {
  this.domElem && this.doSomething();
});

We defiantly should make the kind of check like the one above as i-bem__dom functionality as we did with i-bem in bem-core library.

NOTE: this.domElem is the only true way to check if block still haven't been destructed (#507).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions