Skip to content

Instantly share code, notes, and snippets.

@rochnyak-d-i
Last active August 29, 2015 14:08
Show Gist options
  • Save rochnyak-d-i/f661d8716de4952d7cff to your computer and use it in GitHub Desktop.
Save rochnyak-d-i/f661d8716de4952d7cff to your computer and use it in GitHub Desktop.
JS Связывание
if (typeof Function.prototype.bind === 'undefined') {
Function.prototype.bind = function (thisArg) {
var
fn = this
, slice = Array.prototype.slice
, args = slice.call(arguments, 1)
;
return function () {
return fn.apply(thisArg, args.concat(slice.call(arguments)));
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment