Closed belozer closed 6 years ago
Process all decls in onSetMod on init (without declMod)
const CartItem = bemDom.declBlock('CartItem', { onSetMod : { js : { inited() { console.log('inited') } }, focused : { 'true'() { console.log('focused modifer'); // Add listeners and find blocks }, ''() { // Stop listeners } } }, }); cartItem = new CartItem({ 'focused' : true }); console.log(cartItem.getMod('focused')) cartItem.setMod('focused'); });
in console
inited true
But want so
focused modifer inited true
Process all decls in onSetMod on init (without declMod)
in console
But want so