We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
document.loaded
true
dom:loaded
1 parent 95ccdc5 commit addd725Copy full SHA for addd725
src/prototype/dom/event.js
@@ -1407,6 +1407,15 @@
1407
1408
fireContentLoadedEvent();
1409
}
1410
+
1411
1412
+ if (document.readyState === 'complete') {
1413
+ // We must have been loaded asynchronously, because the DOMContentLoaded
1414
+ // event has already fired. We can just fire `dom:loaded` and be done
1415
+ // with it.
1416
+ fireContentLoadedEvent();
1417
+ return;
1418
+ }
1419
1420
if (document.addEventListener) {
1421
// All browsers that support DOM L2 Events support DOMContentLoaded,
0 commit comments