fix(core): update

This commit is contained in:
Philipp Kunz 2020-05-23 16:43:36 +00:00
parent 9f76d4e920
commit 74cf94a69e

View File

@ -15,10 +15,15 @@ export const elementBasicSetup = async () => {
const documentReady = defer();
document.onreadystatechange = () => {
if (document.readyState === 'interactive' || document.readyState === 'complete') {
console.log('elementBasicSetup: element basic setup complete')
documentReady.resolve();
} else {
console.log('elementBasicSetup: document not yet ready');
}
};
console.log('elementBasicSetup: waiting for document to be ready');
await documentReady.promise;
console.log('elementBasicSetup: document ready!');
// lets get started
const head = document.querySelector('head');