1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

[assert] element.closest (Failed)

This commit is contained in:
Witold Filipczyk 2024-04-12 17:29:46 +02:00
parent 0ec3a68148
commit 1b1b34e0d7

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<body>
<div class="demo container"> Grandparent
<div class="demo container">Parent
<div id="myElement" class="demo">The outer HTML of closest element will be shown.</div>
</div>
</div>
<script>
var element = document.getElementById("myElement");
var closest = element.closest(".container");
console.error('element.closest.html');
console.assert(closest.outerHTML === '<DIV class="demo container">Parent\n <DIV id="myElement" class="demo">The outer HTML of closest element will be shown.</DIV>\n </DIV>', 'TODO');
console.exit(1);
</script>
</body>
</html>