Created
June 2, 2010 18:00
-
-
Save bga/422741 to your computer and use it in GitHub Desktop.
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() | |
{ | |
var _oldBind = Function.prototype.bind, _slice = Array.prototype.slice, | |
_toString = function() | |
{ | |
return '' + this._fn; | |
}; | |
Function.prototype.bind = function(that) | |
{ | |
var _ret = _oldBind.apply(this, arguments); | |
_ret.that = arguments[0]; | |
_ret.args = _slice.call(arguments, 1); | |
_ret._fn = this; | |
_ret.prototype = this.prototype; | |
_ret.toString = _toString; | |
return _ret; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Это помогает определить какой хендлер висит на событии. Когда у тебя 35000+ строк кода это бывает проблематично.