summaryrefslogtreecommitdiff
path: root/test/js
diff options
context:
space:
mode:
Diffstat (limited to 'test/js')
-rw-r--r--test/js/settimeout.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/js/settimeout.html b/test/js/settimeout.html
new file mode 100644
index 000000000..1755973c6
--- /dev/null
+++ b/test/js/settimeout.html
@@ -0,0 +1,17 @@
+<html>
+ <head>
+ <title>setTimeout and setInterval</title>
+ <script>
+ var counter = 0;
+ var interval_handle = setInterval(function() {
+ console.log("Called back ", counter, " times");
+ counter = counter + 1;
+ }, 100);
+ setTimeout(function() {clearInterval(interval_handle);}, 10000);
+ </script>
+ </head>
+ <body>
+ Check the log, it should be printing a callback indicator for ten
+ seconds and then stop.
+ </body>
+</html>