Closed vtambourine closed 9 years ago
This is because we strongly recommend to use live methods. In fact, very few blocks in our internal library really do not need this method. Let's ask Dmitry what he thinks.
Let's say I have the b-stage
block, which has to cut itself into tiles, depending on parameters. I declare b-stage
in bemjson template and it is only DOM block I need. I expect it to run immediately, running a loop and calling multiple b-tiles
. The only way to use live method is to bind to DOM ready event or something like that. That seems to me quite redundantly. Can you please tell me am I wrong?
I think the best decision is not removing this live section but commented it. Thank you!
Неактуально за давностью лет
Due to the
blocks-common/i-bem/bem/techs/js.js
all files in js technology are created with declared emptylive
method by default. This is quite confusing behaviour, because I have to intentionally remove this declaration to prevent it from overwriting block initialization on creation by bemjson file.I convinced, this code should be wrapped by some comments.