bem-bl icon indicating copy to clipboard operation
bem-bl copied to clipboard

i-bem__dom: afterCurrentEvent should guarantee block existence

Open narqo opened this issue 10 years ago • 1 comments

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

narqo avatar Sep 18 '14 10:09 narqo

BEM-2124

deeonis avatar Feb 25 '15 16:02 deeonis