Last active
August 29, 2015 14:11
-
-
Save ndugger/72d91a69b09bec2b8184 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
(function(Vorge) { | |
function YourModule() { | |
this.api = YourModule.prototype; | |
}; | |
YourModule.prototype = { | |
}; | |
Vorge.api.YourModule = YourModule; | |
})(window.Vorge); | |
//====================== | |
//EXAMPLE: | |
//====================== | |
//(function(Vorge) { | |
// function Image(src) { | |
// this.api = Image.prototype; | |
// this.src = src; | |
// }; | |
// Image.prototype = { | |
// load: function() { | |
// var _this = this; | |
// return new Promise(function(resolve) { | |
// var image = new window.Image(); | |
// image.onload = function() { | |
// resolve(); | |
// }; | |
// image.src = _this.src; | |
// }); | |
// } | |
// }; | |
// Vorge.api.Image = Image; | |
//})(window.Vorge); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment