Created
December 20, 2012 01:31
-
-
Save kara-ryli/4342289 to your computer and use it in GitHub Desktop.
Potential enhancement to YUI's loader API allowing module-level skin selection and avoiding naming collisions.
This file contains hidden or 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({ | |
groups: { | |
group1: { modules: ["mymodule": {}], base: "http://group1..." }, | |
group2: { modules: ["mymodule": {}], base: "http://group2..." }, | |
} | |
}).use( | |
// maintain current usage | |
"node", | |
// allow specifying skins at the module level | |
{ name: "slider", skin: "round-dark" /* or ["sam", "round-dark"] */ }, | |
// allow specifying groups to avoid naming collisions | |
{ name: "mymodule", group: "group2" } | |
), function (Y) { | |
// your code is ready! | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment