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:
parent
9d60f4042c
commit
b5eb791ec4
@ -77,6 +77,7 @@ took = [
|
||||
'fragment.getElementsByTagName.html',
|
||||
'keyboardEvent.html',
|
||||
'navigator.appCodeName.html',
|
||||
'node.nodeType.html',
|
||||
'nodelist.forEach.html',
|
||||
'window.setTimeout.html',
|
||||
'URL.html',
|
||||
|
25
test/ecmascript/assert/node.nodeType.html
Normal file
25
test/ecmascript/assert/node.nodeType.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user