diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-17 17:28:18 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-17 20:09:44 +0200 |
commit | de12cf6821679c900ced1c8164741bfefbde97b0 (patch) | |
tree | 990d7f303ee79c33881881b0e8c210e22b5848d2 /Base/res/html/misc/raf.html | |
parent | 4720635aabc06e3ad24bae8a3b08afe6bdb00ae7 (diff) | |
download | serenity-de12cf6821679c900ced1c8164741bfefbde97b0.zip |
Base: Move all the HTML test content into /res/html/misc
Diffstat (limited to 'Base/res/html/misc/raf.html')
-rw-r--r-- | Base/res/html/misc/raf.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Base/res/html/misc/raf.html b/Base/res/html/misc/raf.html new file mode 100644 index 0000000000..25b9642b7a --- /dev/null +++ b/Base/res/html/misc/raf.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<html> +<head><title>rAF test</title></head> +<body> +<canvas id=c width=300 height=300></canvas> +<script> +c = document.getElementById('c'); +x = c.getContext("2d"); +x.fillStyle = 'black'; +x.fillRect(0, 0, c.width, c.height); +function raf() { + x.fillStyle = 'red'; + x.fillRect( + Math.random() * c.width, + Math.random() * c.height, + Math.random() * 10, + Math.random() * 10 + ); + requestAnimationFrame(raf); +} +requestAnimationFrame(raf); +</script> +</body> +</html> |