diff --git a/src/boot.js b/src/boot.js index 1079a0b..4d96378 100644 --- a/src/boot.js +++ b/src/boot.js @@ -8,25 +8,22 @@ // bootstrap parsing function bootstrap() { - // go async so call stack can unwind - setTimeout(function() { - // parse document - CustomElements.parser.parse(document); - // one more pass before register is 'live' - CustomElements.upgradeDocument(document); - // set internal 'ready' flag, now document.register will trigger - // synchronous upgrades - CustomElements.ready = true; - // capture blunt profiling data - CustomElements.readyTime = Date.now(); - if (window.HTMLImports) { - CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime; - } - // notify the system that we are bootstrapped - document.body.dispatchEvent( - new CustomEvent('WebComponentsReady', {bubbles: true}) - ); - }, 0); + // parse document + CustomElements.parser.parse(document); + // one more pass before register is 'live' + CustomElements.upgradeDocument(document); + // set internal 'ready' flag, now document.register will trigger + // synchronous upgrades + CustomElements.ready = true; + // capture blunt profiling data + CustomElements.readyTime = Date.now(); + if (window.HTMLImports) { + CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime; + } + // notify the system that we are bootstrapped + document.body.dispatchEvent( + new CustomEvent('WebComponentsReady', {bubbles: true}) + ); } // CustomEvent shim for IE