Created
June 2, 2010 18:00
-
-
Save bga/422741 to your computer and use it in GitHub Desktop.
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
(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; | |
} | |
})(); |
NV
commented
Jun 2, 2010
Не знаю зачем такое надо, но я пропатчил.
Это помогает определить какой хендлер висит на событии. Когда у тебя 35000+ строк кода это бывает проблематично.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment