bem / bem-core

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

i-bem.bemhtml: Add `replace` mode as short-cut for `def()(function() { applyCtx(...) })` #822

Closed veged closed 9 years ago

veged commented 9 years ago

We can introduce short-cut for cases like:

block('b1').def()(function() { applyCtx(...) })
block('b1').replace()(function() { return ... })

Moreover, we can make short-cut for another common case:

block('b1').def()(function() {
    applyCtx(this.extend(this.ctx, ...))
})
block('b1').extend()(function() { return ... })

cc @dfilatov @narqo @mishanga

veged commented 9 years ago

moved to https://github.com/bem/bem-xjst/issues/22