mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
parent
fe91f6e238
commit
350c0a61c6
2 changed files with 17 additions and 0 deletions
14
src/test/html/color-change-text.html
Normal file
14
src/test/html/color-change-text.html
Normal 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>
|
3
src/test/html/color-change-text.js
Normal file
3
src/test/html/color-change-text.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
window.setTimeout(function () {
|
||||
document.getElementsByTagName('div')[0].setAttribute('class', 'blue');
|
||||
}, 1000);
|
Loading…
Add table
Add a link
Reference in a new issue