diff options
author | Linus Groh <mail@linusgroh.de> | 2020-05-21 13:44:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-21 15:18:08 +0200 |
commit | 65d94a1e74259a23d189195a9d9d9c17988cf078 (patch) | |
tree | 3ba885addb07397ec8885ec83b6c12946ef853d4 /Base/home/anon/www | |
parent | 4e657c370c0d643364e389dbc8cfd11c1800d540 (diff) | |
download | serenity-65d94a1e74259a23d189195a9d9d9c17988cf078.zip |
Base: Add simple setInterval() test
Diffstat (limited to 'Base/home/anon/www')
-rw-r--r-- | Base/home/anon/www/set-interval.html | 23 | ||||
-rw-r--r-- | Base/home/anon/www/welcome.html | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/Base/home/anon/www/set-interval.html b/Base/home/anon/www/set-interval.html new file mode 100644 index 0000000000..63d26017cd --- /dev/null +++ b/Base/home/anon/www/set-interval.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> +<head> + <title>setInterval() test</title> + <script> + document.addEventListener("DOMContentLoaded", function () { + var output = document.getElementById("output"); + var counter = 0; + function updateOutput () { + output.innerHTML = `setInterval() was called ${counter} times!`; + } + updateOutput(); + setInterval(function () { + counter++; + updateOutput(); + }, 1000); + }); + </script> +</head> +<body> + <div id="output"></div> +</body> +</html> diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html index ea93fcee12..927651e724 100644 --- a/Base/home/anon/www/welcome.html +++ b/Base/home/anon/www/welcome.html @@ -28,6 +28,7 @@ span#ua { <p>Your user agent is: <b><span id="ua"></span></b></p> <p>Some small test pages:</p> <ul> + <li><a href="set-interval.html">setInterval() test</a></li> <li><a href="html-escape-test.html">html character escape test</a></li> <li><a href="location.html">window.location property</a></li> <li><a href="percent-css.html">CSS percentage values</a></li> |