mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 14:31:20 +03:00
c17e588b66
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
18 lines
476 B
HTML
18 lines
476 B
HTML
<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>
|