1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[test] node.ELEMENT_NODE

This commit is contained in:
Witold Filipczyk 2024-09-14 09:49:28 +02:00
parent 9d60f4042c
commit b5eb791ec4
2 changed files with 26 additions and 0 deletions

View File

@ -77,6 +77,7 @@ took = [
'fragment.getElementsByTagName.html',
'keyboardEvent.html',
'navigator.appCodeName.html',
'node.nodeType.html',
'nodelist.forEach.html',
'window.setTimeout.html',
'URL.html',

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<body id="test">
<button onclick="myFunction()">Try it</button>
<a href="/">/</a>
<a href="/home">/home</a>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.documentElement;
console.assert(x.nodeType === 1, 'element is 1');
console.assert(x.nodeType === Node.ELEMENT_NODE, 'element is 1');
}
console.error('node.nodeType.html');
myFunction();
console.exit();
</script>
</body>
</html>