mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
Implement Window.set/clearInterval.(fixes #2116)
This commit is contained in:
parent
896cadbf62
commit
b7dcf62ed0
5 changed files with 92 additions and 13 deletions
19
src/test/html/test_interval.html
Normal file
19
src/test/html/test_interval.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var x = 0;
|
||||
alert("Interval begin");
|
||||
var intervalID = setInterval(function() {
|
||||
if (x < 10) {
|
||||
alert("interval " + x);
|
||||
x += 1;
|
||||
} else {
|
||||
clearInterval(intervalID);
|
||||
alert("Interval deleted");
|
||||
}
|
||||
}, 300);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue