not everybody has HTMLImports

This commit is contained in:
Monica Dinculescu
2017-01-11 15:51:36 -08:00
parent 47de50b759
commit 418c4d67c8

View File

@@ -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);