|
Great! Does YUI load always?
No, you need to do something like
require_js(array('yui_yahoo','yui_event')); to load just he libraries you need - and that is what IMS CP should be doing, instead of horrible hacks. Admittedly, IMS CP and other things have been around longer than require_js has. Yup, but it's nice to know there are newer ways to do that properly. Thanks!
Just for reference:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Just to open the discussion to a related thing... I think it would be great to have some standard way to add onLoad and onUnload event listeners within Moodle, instead of having custom onLoad and onUnload js code here and there.
Edited: just for referece there are some nive addlisteners funcions (js) in : http://cvs.moodle.org/contrib/plugins/course/format/topicstree/loadunload.js?revision=1.1
Ciao