mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[assert] element.closest (Failed)
This commit is contained in:
parent
0ec3a68148
commit
1b1b34e0d7
21
test/ecmascript/assert/element.closest.html
Normal file
21
test/ecmascript/assert/element.closest.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user