mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
Base: Move all the HTML test content into /res/html/misc
This commit is contained in:
parent
4720635aab
commit
de12cf6821
58 changed files with 1 additions and 1 deletions
29
Base/res/html/misc/qsa.html
Normal file
29
Base/res/html/misc/qsa.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div id="foo1" class="foo"></div>
|
||||
<code>
|
||||
<div id="foo2" class="foo"></div>
|
||||
<div id="foo3" class="foo"></div>
|
||||
</code>
|
||||
<pre id="out"></pre>
|
||||
<script>
|
||||
var elements = document.querySelectorAll("code .foo");
|
||||
|
||||
try {
|
||||
if (elements.length !== 2)
|
||||
throw 1;
|
||||
if (elements[0].id !== "foo2")
|
||||
throw 3;
|
||||
if (elements[1].id !== "foo3")
|
||||
throw 4;
|
||||
document.getElementById('out').innerHTML = "Success!";
|
||||
} catch (e) {
|
||||
document.getElementById('out').innerHTML = "Error number " + e;
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue