Skip to content

Instantly share code, notes, and snippets.

View Mark-Simulacrum's full-sized avatar

Mark Rousskov Mark-Simulacrum

View GitHub Profile
@MiguelCastillo
MiguelCastillo / bind.js
Last active May 28, 2023 12:20
Bind polyfill
/**
* Function bind polyfill
* https://github.com/ariya/phantomjs/issues/10522
*/
if (!Function.prototype.bind) {
Function.prototype.bind = function (context /* ...args */) {
var fn = this;
var args = Array.prototype.slice.call(arguments, 1);