Skip to content

Instantly share code, notes, and snippets.

@nanasess
Created June 7, 2016 15:51
Show Gist options
  • Save nanasess/45b342cf237852a1d784f98946b9a7b7 to your computer and use it in GitHub Desktop.
Save nanasess/45b342cf237852a1d784f98946b9a7b7 to your computer and use it in GitHub Desktop.
JavaScript スケルトン
/* -*- mode: js2 -*- */
;(function($, window, document, undefined) {
var com = {};
com.example = function() {};
com.example.prototype = {
someMethod: function() {
console.log('some-method');
},
foobarMethod: function() {
console.log('foobar-method');
}
};
if (window.com == undefined) window.com = {};
window.com.example = new com.example();
}(jQuery, this, this.document));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment