Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit 51c8369

Browse files
committed
listen for HTMLImportsLoaded only if HTMLImports.ready is false
1 parent 75798bf commit 51c8369

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/boot.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ if (document.readyState === 'complete' || scope.flags.eager) {
5353
// When loading at other readyStates, wait for the appropriate DOM event to
5454
// bootstrap.
5555
} else {
56-
var loadEvent = window.HTMLImports ? 'HTMLImportsLoaded' : 'DOMContentLoaded';
56+
var loadEvent = window.HTMLImports && !HTMLImports.ready ?
57+
'HTMLImportsLoaded' : 'DOMContentLoaded';
5758
window.addEventListener(loadEvent, bootstrap);
5859
}
5960

0 commit comments

Comments
 (0)