by Geoffrey Rowland.
Hi Gareth and Andrew
A big thanks for the pointers to using YUI modules for getting JavaScript into Moodle. They have helped me make considerable progress in getting a Moodle JSmol filter working. Hope to release the code shortly..
One quick YUI newbie question, Is there any practical difference/benefit/preference in using 1. compared to 2. below? Apart from 2. being slightly more verbose, they both appear to work well in my hands.
Cheers
Geoff
1.
YUI({ ...detail of module... }).use('module', function(Y) { ...JavaScript... });
2.
YUI.applyConfig({ ...detail of module... });
YUI().use('module', function(Y) { ...JavaScript... });