Created
December 11, 2012 23:58
-
-
Save hatched/4263533 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI({ | |
modules: { | |
'module1': { | |
path: 'path/to/module1.js', | |
requires: ['modules', 'this', 'requires'] | |
} | |
} | |
}).use('node', function(Y) { | |
//module1 is not loaded | |
Y.use('module1', function(Y) { | |
//module 1 has been fetched from the server and then | |
//loaded into the parent sandbox then this callback is called | |
}) ; | |
//module1 is not available until the above use returns | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment