diff --git a/src/post-polyfill.js b/src/post-polyfill.js index 7f0c1bf..3299213 100644 --- a/src/post-polyfill.js +++ b/src/post-polyfill.js @@ -12,10 +12,16 @@ 'use strict'; - HTMLImports.whenReady(function() { + if (window.HTMLImports) { + HTMLImports.whenReady(function() { + requestAnimationFrame(function() { + window.dispatchEvent(new CustomEvent('WebComponentsReady')); + }); + }); + } else { requestAnimationFrame(function() { window.dispatchEvent(new CustomEvent('WebComponentsReady')); }); - }); + } })(window.WebComponents);