Move dispatching WebComponentsReady until after HTMLImports.whenReady is patched.

This commit is contained in:
Steven Orvell
2017-02-06 21:55:06 -08:00
parent 455c407e22
commit 7bb0b7d5ec

View File

@@ -12,12 +12,6 @@
'use strict';
HTMLImports.whenReady(function() {
requestAnimationFrame(function() {
window.dispatchEvent(new CustomEvent('WebComponentsReady'));
});
});
if (customElements && customElements.polyfillWrapFlushCallback) {
// Here we ensure that the public `HTMLImports.whenReady`
// always comes *after* custom elements have upgraded.
@@ -44,4 +38,10 @@
}
HTMLImports.whenReady(function() {
requestAnimationFrame(function() {
window.dispatchEvent(new CustomEvent('WebComponentsReady'));
});
});
})(window.WebComponents);