Closed qfox closed 8 years ago
Something like:
oninit(function(){ BEMContext.prototype.flushieFlushie = function(){ return _buf.splice(0).join(''); }; var _buf = []; BEMContext.prototype._flush = function(chunk){ _buf.push(chunk); return ''; }; }); // and block('page').elem('flusher').def()(function(){ return this.flushieFlushie(); });
See: https://github.com/bem/bem-xjst/blob/678e33e19d2dc4289aee4f65ef80eeb393f7b4d9/test/runtime-test.js#L396-L434 https://github.com/bem/bem-xjst/wiki/Notable-changes-between-bem-xjst@1.x-and-bem-xjst@2.x#this_str-is-gone
:+1:
https://github.com/bem/bem-xjst/wiki/Notable-changes-between-bem-xjst@1.x-and-bem-xjst@2.x#user-content-this_str-is-gone
Something like:
See: https://github.com/bem/bem-xjst/blob/678e33e19d2dc4289aee4f65ef80eeb393f7b4d9/test/runtime-test.js#L396-L434 https://github.com/bem/bem-xjst/wiki/Notable-changes-between-bem-xjst@1.x-and-bem-xjst@2.x#this_str-is-gone