Skip to content

Instantly share code, notes, and snippets.

@SecretDeveloper
Last active August 29, 2015 14:04
Show Gist options
  • Save SecretDeveloper/8a4dd9cfd0a14f45f8a7 to your computer and use it in GitHub Desktop.
Save SecretDeveloper/8a4dd9cfd0a14f45f8a7 to your computer and use it in GitHub Desktop.
Widget configuration injection
(function(root){
var widget = function(){
var self = this;
// configuration
var config = {
css:{
theme:'current'
},
ids:{
container:'divcontainer'
},
user_idenitfication_text:'12345',
client_version:'1.0.0',
api_version:'1.0.0',
jquery_version:'1.10'
};
function initialize(){
// load required libraries
// initialise view engine etc
// self.config is available here
};
return {
initialize:initialize
};
}();
widget.initialize();
})(window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment