Skip to content

Instantly share code, notes, and snippets.

@frentsel
Last active August 29, 2015 14:26
Show Gist options
  • Save frentsel/8ce014efe46156dec02f to your computer and use it in GitHub Desktop.
Save frentsel/8ce014efe46156dec02f to your computer and use it in GitHub Desktop.
({
css: function(el, prop){
/*return css-prop*/
},
ajax: function(options){
/*make ajax-request*/
},
init: function(name){
var cache = {};
this.getCache = function(){ return cache };
delete this.init;
window[name] = this;
}
}).init("MY");
MY.ajax({ url: 'http://google.com', async: true }); //ajax-req.
MY.css(document.body, "width"); // some width
MY.getCache(); // {}
typeof MY.cache // undefined.
typeof MY.init // undefined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment