Created
December 9, 2010 03:35
-
-
Save hiromitz/734298 to your computer and use it in GitHub Desktop.
delegator
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
/** | |
* delegate | |
* @param {Object} o target object | |
* @param function m target method | |
*/ | |
function delegate(o, m){ | |
return function(){ | |
return m.apply(o, arguments); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment