We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CodePen
modules.require([ 'jquery', 'i-bem-dom', 'BEMHTML', 'button' ], ($, bemDom, BEMHTML, Button) => { const html = BEMHTML.apply([ { block : 'test', js : true }, { block : 'button', text : 'click me' } ]); const Root = bemDom.declBlock('root'); bemDom.declBlock('test', { onSetMod : { js : { inited : function() { console.log('Test inited'); const btn = this.findParentBlock(Root).findChildBlock(Button); this._events(btn).on('click', this._onButtonClick, this); } } }, _onButtonClick : function() { console.log('On button click from _events'); }, }, { lazyInit : false }); bemDom.append($('.root'), html); setTimeout(() => { bemDom.destruct($('.test')); console.log('Test destructed'); }, 500); });
После destuct блока кликаем на кнопку и получаем в консоль: On button click from _events
On button click from _events
upd возможно проблема смежная с #1525
upd Проблему вроде починил. Осталось разобраться в причине и прислать PR
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
CodePen
После destuct блока кликаем на кнопку и получаем в консоль:
On button click from _events
upd
возможно проблема смежная с #1525
upd
Проблему вроде починил. Осталось разобраться в причине и прислать PR
The text was updated successfully, but these errors were encountered: