Created
January 29, 2015 23:18
-
-
Save hwclass/398338a309bf1d7232f3 to your computer and use it in GitHub Desktop.
Sample module implementation
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
/* | |
* A module implementation to bind events and do something else independently | |
*/ | |
var module = (function () { | |
return function (elementType, methods) { | |
console.log(elementType); | |
console.log(methods); | |
} | |
})(); | |
/* | |
* That is the usage of module implemenetation | |
*/ | |
module('button', {createNew : function () {} }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment