Spaces:
Running
Running
doctype
Browse files- dist/index.html +14 -1
dist/index.html
CHANGED
|
@@ -1,4 +1,17 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
<html>
|
| 3 |
<head>
|
| 4 |
<script src="distill.bundle.js" type="module" fetchpriority="high" blocking></script>
|
|
|
|
| 1 |
+
<script>
|
| 2 |
+
// Block rendering until we ensure DOCTYPE is present
|
| 3 |
+
if (document.doctype === null) {
|
| 4 |
+
const doctypeNode = document.implementation.createDocumentType('html', '', '');
|
| 5 |
+
if (document.firstChild) {
|
| 6 |
+
document.insertBefore(doctypeNode, document.firstChild);
|
| 7 |
+
} else {
|
| 8 |
+
document.appendChild(doctypeNode);
|
| 9 |
+
}
|
| 10 |
+
}
|
| 11 |
+
else {
|
| 12 |
+
console.log('DOCTYPE is present');
|
| 13 |
+
}
|
| 14 |
+
</script>
|
| 15 |
<html>
|
| 16 |
<head>
|
| 17 |
<script src="distill.bundle.js" type="module" fetchpriority="high" blocking></script>
|