Skip to content

Instantly share code, notes, and snippets.

Created April 21, 2015 16:05
Show Gist options
  • Select an option

  • Save anonymous/9cf4c9aad0a8afecf334 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/9cf4c9aad0a8afecf334 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/soneyefeye
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="foo"></div>
<script id="jsbin-javascript">
function dom_block() {
var div, start;
div = document.getElementById("foo");
for (var i = 10; i > 0; i--) {
div.innerHTML = i;
start = +new Date;
while (+new Date < start + 1000) {
// noprotect
}
}
div.innerHTML = "Done!";
}
dom_block();
</script>
<script id="jsbin-source-javascript" type="text/javascript">function dom_block() {
var div, start;
div = document.getElementById("foo");
for (var i = 10; i > 0; i--) {
div.innerHTML = i;
start = +new Date;
while (+new Date < start + 1000) {
// noprotect
}
}
div.innerHTML = "Done!";
}
dom_block();</script></body>
</html>
function dom_block() {
var div, start;
div = document.getElementById("foo");
for (var i = 10; i > 0; i--) {
div.innerHTML = i;
start = +new Date;
while (+new Date < start + 1000) {
// noprotect
}
}
div.innerHTML = "Done!";
}
dom_block();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment