aboutsummaryrefslogtreecommitdiffstats
path: root/test/js/documentall.html
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/documentall.html')
-rw-r--r--test/js/documentall.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/js/documentall.html b/test/js/documentall.html
new file mode 100644
index 00000000..14db9d70
--- /dev/null
+++ b/test/js/documentall.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<title>HTMLCollection test</title>
+<div id="result">Fail</div>
+<style>style 1</style>
+<style>style 2</style>
+<style>style 3</style>
+<script>
+(function() {
+ const abc = document.all;
+ if (document.all || abc) return; /* document.all must be falsy */
+ if (abc.length !== 9) return;
+ const styles = [abc[5], abc[6], abc[7]];
+ if (styles[0].textContent !== "style 1") return;
+ if (styles[1].textContent !== "style 2") return;
+ if (styles[2].textContent !== "style 3") return;
+ const result = document.getElementById("result");
+ result.textContent = "Success";
+})()
+</script>