Skip to content

Instantly share code, notes, and snippets.

@bga
Created June 2, 2010 18:00
Show Gist options
  • Save bga/422741 to your computer and use it in GitHub Desktop.
Save bga/422741 to your computer and use it in GitHub Desktop.
(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
Copy link

NV commented Jun 2, 2010

Это помогает определить какой хендлер висит на событии. Когда у тебя 35000+ строк кода это бывает проблематично.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment