1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00
elinks/test/js/assert/fragment.hasChildNodes.html
2024-09-29 18:15:34 +02:00

26 lines
450 B
HTML

<!DOCTYPE html>
<html>
<body>
<ul id="myList">
<li>Coffee</li>
<li>Tea</li>
</ul>
<script>
function myFunction() {
var ab = document.createDocumentFragment();
console.assert(!ab.hasChildNodes(), 'no child nodes');
var bc = document.createElement('li');
ab.appendChild(bc);
console.assert(ab.hasChildNodes(), 'has child nodes');
}
console.error('fragment.hasChildNodes.html');
myFunction();
console.exit();
</script>
</body>
</html>