bonescript.js: add initialized handler