Skip to content

Instantly share code, notes, and snippets.

@ndugger
Last active August 29, 2015 14:11
Show Gist options
  • Save ndugger/72d91a69b09bec2b8184 to your computer and use it in GitHub Desktop.
Save ndugger/72d91a69b09bec2b8184 to your computer and use it in GitHub Desktop.
(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