DracoBlue / jsb

A very extendable Toolkit to inject Javascript Behaviour into rendered HTML without Inline Javascript. (jsb was formerly known as JsBehaviourToolkit)
http://dracoblue.net
Other
52 stars 8 forks source link

in some projects it is useful to return all initialized objects #5

Closed ghost closed 11 years ago

ghost commented 12 years ago

the js-behaviour script now returns an array with objects. the returned objects have three properties:

DracoBlue commented 12 years ago

Interesting add. Could you checkout 1.3.0's event system - it does a different thing, but could be an option to 'trigger' an event as soon as a specific jsb-element was found and initialized. Maybe that solves your issue.

Maybe let's have a chat about that :-). After that I still can add this, I just want to avoid bloat :)

DracoBlue commented 11 years ago

Please use jsb.on('Jsb::BEHAVIOURS_APPLIED', function() { /* do your logik */} to handle the case, when all events got applied.

Available since 3ba7a975dd1e1b3ad8533343c503a68f12b50c13