Created
January 14, 2015 13:57
-
-
Save think2011/d2b356d4c089d1ca6496 to your computer and use it in GitHub Desktop.
允许二次bind的bind函数
This file contains hidden or 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
Function.prototype.bind = function (fn) { | |
var ret = function () { | |
return ret._fn.apply(fn); | |
} | |
ret.fn = this._fn || this; | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment