We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 45dadc4 + da0b37c commit e61fe7fCopy full SHA for e61fe7f
example/fetch-example.html
@@ -48,11 +48,13 @@ <h1>Fetch API example</h1>
48
}
49
})()
50
</script>
51
+ <pre><code id="source"></code></pre>
52
<script>
53
const script = document.getElementById("script");
- document.write("<pre><code>");
54
- document.write(script.innerText.replace(/^ {6}/gms, ""));
55
- document.write("</code><pre>");
+ const source = document.getElementById("source");
+ source.appendChild(
56
+ document.createTextNode(
57
+ script.innerText.replace(/^ {6}/gms, "")));
58
59
</main>
60
</body>
0 commit comments