Spaces:
Running
Running
tmp
Browse files- dist/index.html +5 -3
dist/index.html
CHANGED
@@ -7,9 +7,11 @@
|
|
7 |
const htmlElement = document.documentElement;
|
8 |
const newHtmlElement = htmlElement.cloneNode(true);
|
9 |
htmlElement.parentNode.replaceChild(newHtmlElement, htmlElement);
|
10 |
-
//
|
11 |
-
|
12 |
-
|
|
|
|
|
13 |
}
|
14 |
else {
|
15 |
console.log('DOCTYPE is present');
|
|
|
7 |
const htmlElement = document.documentElement;
|
8 |
const newHtmlElement = htmlElement.cloneNode(true);
|
9 |
htmlElement.parentNode.replaceChild(newHtmlElement, htmlElement);
|
10 |
+
// Wait for DOM to be ready before forcing reflow
|
11 |
+
document.addEventListener('DOMContentLoaded', () => {
|
12 |
+
void document.body.offsetWidth;
|
13 |
+
console.log('DOCTYPE is present');
|
14 |
+
});
|
15 |
}
|
16 |
else {
|
17 |
console.log('DOCTYPE is present');
|