fix(core): update

This commit is contained in:
2020-05-23 15:40:08 +00:00
parent 2032df467e
commit 7c3d131b46
5 changed files with 24 additions and 13 deletions

View File

@ -9,6 +9,17 @@ export const elementBasicSetup = async () => {
await globalThis.deesCssToolsReady.promise;
} else {
globalThis.deesCssToolsReady = defer();
const documentReady = defer();
document.onreadystatechange = () => {
if (document.readyState === 'interactive') {
documentReady.resolve();
}
};
await documentReady.promise;
const head = document.querySelector('head');
const styleElement = document.createElement('style');
styleElement.type = 'text/css';
styleElement.appendChild(document.createTextNode(materialFontCss));
globalThis.deesCssToolsReady.resolve();
}
};