Implement Window.set/clearInterval.(fixes #2116)

This commit is contained in:
lpy 2014-04-16 22:55:39 +08:00
parent 896cadbf62
commit b7dcf62ed0
5 changed files with 92 additions and 13 deletions

View 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>