diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-05-03 11:32:47 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-05-03 11:33:07 +0100 |
commit | c17e588b66360e984241a80077ce986a9182f0de (patch) | |
tree | cc6848cb5d40dc9e0453b73bacc820d116faa4fc /test | |
parent | 35e9b5de6d59436568d9cbb951c98e716716bd7e (diff) | |
download | netsurf-c17e588b66360e984241a80077ce986a9182f0de.tar.gz netsurf-c17e588b66360e984241a80077ce986a9182f0de.tar.bz2 |
Javascript: Support setTimeout and friends
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/js/settimeout.html | 17 |
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> |