I am trying to make a script where while var < 1, it pastes letters, but it makes my screen crash. I tried seeing some questions here on StackOverflow, but the code doesn't line up with mine. I want the interval to be every 2 milliseconds
My code:
<template>
a
</template>
<html>
<head>a</head>
<body onLoad="pasteContent()">
</body>
<script>
while (true) {
function pasteContent() {
var i = 0;
var temp = document.getElementsByTagName("template")[0];
var clon = temp.content.cloneNode(true);
document.body.appendChild(clon);
}
}
</script>
</html>