fix lib functions

This commit is contained in:
Fabian Jakobs 2010-12-15 14:14:15 +01:00
commit 7bb4950a1c
2 changed files with 6 additions and 6 deletions

View file

@ -148,14 +148,14 @@ else {
eventHandler && eventHandler(e);
releaseCaptureHandler && releaseCaptureHandler();
exports.removeEventListener("mousemove", onMouseMove, true);
exports.removeEventListener("mouseup", onMouseUp, true);
el.removeEventListener("mousemove", onMouseMove, true);
el.removeEventListener("mouseup", onMouseUp, true);
e.stopPropagation();
}
exports.addEventListener("mousemove", onMouseMove, true);
exports.addEventListener("mouseup", onMouseUp, true);
el.addEventListener("mousemove", onMouseMove, true);
el.addEventListener("mouseup", onMouseUp, true);
};
}

View file

@ -105,7 +105,7 @@ if (!Object.keys) {
if (!Function.prototype.bind) {
// from MDC
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind
Function.prototype.bind = function () {
Function.prototype.bind = function (obj) {
var slice = [].slice;
var args = slice.call(arguments, 1);
var self = this;
@ -114,7 +114,7 @@ if (!Function.prototype.bind) {
// optimize common case
if (arguments.length == 1) {
var bound = function() {
return fcn.apply(this instanceof nop ? this : obj, arguments);
return self.apply(this instanceof nop ? this : obj, arguments);
};
}
else {