Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

IE might make me grumpy, but bgerrissen helped me fix bugs in my Prot…

…otype-derived loading code. Closes #1.
  • Loading branch information...
commit 736733df472f09e922849b6e5dc7faf78fe3af00 1 parent 7aa5e72
Alex Young authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 riot.js
View
8 riot.js
@@ -52,7 +52,7 @@
function checkReadyState() {
if (document.readyState === 'complete') {
- document.stopObserving('readystatechange', checkReadyState);
+ document.detachEvent('readystatechange', checkReadyState);
fireContentLoadedEvent();
}
}
@@ -60,7 +60,7 @@
function pollDoScroll() {
try { document.documentElement.doScroll('left'); }
catch(e) {
- timer = pollDoScroll.defer();
+ timer = setTimeout(pollDoScroll, 10);
return;
}
fireContentLoadedEvent();
@@ -69,9 +69,9 @@
if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
} else {
- document.observe('readystatechange', checkReadyState);
+ document.attachEvent('readystatechange', checkReadyState);
if (window == top)
- timer = pollDoScroll.defer();
+ timer = setTimeout(pollDoScroll, 10);
}
window.onload = fireContentLoadedEvent;
Please sign in to comment.
Something went wrong with that request. Please try again.