Skip to content

Commit 6d69673

Browse files
Trigger page load listeners when no longer loading
* Switch from waiting until complete which could lead to severe rendering delays
1 parent 6e534ad commit 6d69673

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/web/requirejs/domReady.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ define(function () {
7878
}
7979
}
8080

81-
//Check if document already complete, and if so, just trigger page load
81+
//Check if document is no longer loading, and if so, just trigger page load
8282
//listeners. Latest webkit browsers also use "interactive", and
8383
//will fire the onDOMContentLoaded before "interactive" but not after
8484
//entering "interactive" or "complete". More details:
@@ -89,7 +89,7 @@ define(function () {
8989
//so removing the || document.readyState === "interactive" test.
9090
//There is still a window.onload binding that should get fired if
9191
//DOMContentLoaded is missed.
92-
if (document.readyState === "complete") {
92+
if (document.readyState !== "loading") {
9393
pageLoaded();
9494
}
9595
}

0 commit comments

Comments
 (0)