bem / bem-core

BEM Core Library
https://ru.bem.info/technologies/classic/i-bem/
Other
275 stars 94 forks source link

elemInstances: live does not called on init #800

Closed qfox closed 9 years ago

qfox commented 9 years ago

With bemjson:

{
  block : 'block',
  js : true,
  content : {
    elem : 'elem',
    js : true
  }
}

and browser.js:

BEMDOM.decl({ block : 'block', 'elem' : 'elem' }, {}, {
  live : function () {
    // doesn't called on DOM.init
  }
});
qfox commented 9 years ago

Feels like it requires mix : { block : 'i-bem' } on elem.

Should we add this to docs?

/cc @aristov @tadatuta

qfox commented 9 years ago

I think it also referring to #731

Now we need to mix i-bem class manually. With [data-bem] selector we shouldn't mix it for live and behavior will change.

qfox commented 9 years ago

I'm closing this since elemInstances is experimental thing in v2.