hynky HF Staff commited on
Commit
76360d7
·
1 Parent(s): ef328c1
Files changed (1) hide show
  1. dist/index.html +14 -1
dist/index.html CHANGED
@@ -1,4 +1,17 @@
1
- <!DOCTYPE html>
 
 
 
 
 
 
 
 
 
 
 
 
 
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>