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().use("singleton-class", function (Y) { | |
var instance1 = new Y.SingletonClass(), | |
instance2 = new Y.SingletonClass(); | |
Y.log(instance1 === instance2); // true! | |
window.instance1 = instance1; | |
}); | |
YUI().use("singleton-class", function (Y) { |
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
node_modules/ |
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
/** | |
* Light-weight YUI-dependend Script Loader | |
* - loads YUI 3 if not already loaded | |
* - then loads your script(s) | |
* | |
* Useful for dynamically loaded modules, injected scripts, bookmarklets, etc… | |
*/ | |
(function() { | |
// YUI to load if unavailable |
NewerOlder