Older IE fixes

Still not green, but getting close. Summary of Older IE discrepancies:
- Older IE doesn't have apply/call on the timing functions
- Older IE doesn't allow applying falsy arguments
- Older IE doesn't allow setting onclick to undefined values
- Older IE doesn't have text property on dom nodes
This commit is contained in:
Sheel Choksi
2013-07-21 18:40:12 -07:00
parent d4f78922cd
commit 61a1f93488
6 changed files with 15 additions and 15 deletions

View File

@@ -34,7 +34,7 @@ getJasmineRequireObj().Clock = function() {
}
return timer.setTimeout(fn, delay);
}
return timer.setTimeout.apply(global, arguments);
return Function.prototype.apply.apply(timer.setTimeout, [global, arguments]);
};
self.setInterval = function(fn, delay, params) {
@@ -44,15 +44,15 @@ getJasmineRequireObj().Clock = function() {
}
return timer.setInterval(fn, delay);
}
return timer.setInterval.apply(global, arguments);
return Function.prototype.apply.apply(timer.setInterval, [global, arguments]);
};
self.clearTimeout = function(id) {
return timer.clearTimeout.call(global, id);
return Function.prototype.call.apply(timer.clearTimeout, [global, id]);
};
self.clearInterval = function(id) {
return timer.clearInterval.call(global, id);
return Function.prototype.call.apply(timer.clearInterval, [global, id]);
};
self.tick = function(millis) {