Add an HTML file where JavaScript changes text color

I wanted this for testing incremental layout, but it's also useful to
illustrate a bug I just found.
This commit is contained in:
Keegan McAllister 2013-07-24 13:07:37 -07:00
parent fe91f6e238
commit 350c0a61c6
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<style>
.red { color: red; }
.blue { color: blue; }
</style>
<script src="color-change-text.js"></script>
</head>
<body>
<div id="change" class="red">Hello, World!</div>
</body>
</html>

View file

@ -0,0 +1,3 @@
window.setTimeout(function () {
document.getElementsByTagName('div')[0].setAttribute('class', 'blue');
}, 1000);