mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
Move dispatching WebComponentsReady until after HTMLImports.whenReady is patched.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user