mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 09:50:05 +08:00
fixed #383
This commit is contained in:
@@ -135,6 +135,22 @@ var Kinetic = {};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// bind() shim for older browsers
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function (oThis) {
|
||||
var aArgs = Array.prototype.slice.call(arguments, 1),
|
||||
fToBind = this,
|
||||
fNOP = function () {},
|
||||
fBound = function () {
|
||||
return fToBind.apply(this instanceof fNOP && oThis ? this : oThis,
|
||||
aArgs.concat(Array.prototype.slice.call(arguments)));
|
||||
};
|
||||
fNOP.prototype = this.prototype;
|
||||
fBound.prototype = new fNOP();
|
||||
return fBound;
|
||||
};
|
||||
}
|
||||
})();
|
||||
|
||||
// Uses Node, AMD or browser globals to create a module.
|
||||
|
Reference in New Issue
Block a user