Skip to content

Commit

Permalink
Use DOMContentLoaded in the recent versions of WebKit that support it.
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed May 19, 2008
1 parent 8c2873f commit cfce959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/event.js
Expand Up @@ -412,8 +412,8 @@ Object.extend(document, {
}
}

// Only WebKit nightly builds support DOMContentLoaded
if (Prototype.Browser.WebKit) {
// WebKit builds lower than 525.13 don't support DOMContentLoaded
if (Prototype.Browser.WebKit && (navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1] < 525)) {
timer = setInterval(function() {
if (/loaded|complete/.test(document.readyState) &&
document.styleSheets.length == $$('style, link[rel="stylesheet"]').length)
Expand Down

0 comments on commit cfce959

Please sign in to comment.