Skip to content

Instantly share code, notes, and snippets.

@think2011
Created January 14, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save think2011/d2b356d4c089d1ca6496 to your computer and use it in GitHub Desktop.
Save think2011/d2b356d4c089d1ca6496 to your computer and use it in GitHub Desktop.
允许二次bind的bind函数
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