From 51c836922f2789669188b61d6ee9c49ac5cb0eb0 Mon Sep 17 00:00:00 2001 From: Steve Orvell Date: Tue, 14 Jan 2014 08:47:43 -0800 Subject: [PATCH] listen for HTMLImportsLoaded only if HTMLImports.ready is false --- src/boot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/boot.js b/src/boot.js index 1d0ad6c..7872858 100644 --- a/src/boot.js +++ b/src/boot.js @@ -53,7 +53,8 @@ if (document.readyState === 'complete' || scope.flags.eager) { // When loading at other readyStates, wait for the appropriate DOM event to // bootstrap. } else { - var loadEvent = window.HTMLImports ? 'HTMLImportsLoaded' : 'DOMContentLoaded'; + var loadEvent = window.HTMLImports && !HTMLImports.ready ? + 'HTMLImportsLoaded' : 'DOMContentLoaded'; window.addEventListener(loadEvent, bootstrap); }