Skip to content

Instantly share code, notes, and snippets.

@akkana
Created January 17, 2020 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akkana/a780df6a7071dc5f340c224acf0b615f to your computer and use it in GitHub Desktop.
Save akkana/a780df6a7071dc5f340c224acf0b615f to your computer and use it in GitHub Desktop.
<html>
<head>
<title>innerHTML Leak</title>
</head>
<body>
<h1>innerHTML Leak</h1>
<p id="thecontent">
</p>
<script type="text/javascript">
console.log("whoop de do");
var i = 0;
function changeContent() {
var s = "Now we're at number " + i;
document.getElementById("thecontent").innerHTML = s;
i += 1;
setTimeout(changeContent, 2000);
}
changeContent();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment