mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
[assert] document.documentElement
This commit is contained in:
parent
1445d613c6
commit
305664eaf9
24
test/ecmascript/assert/document.documentElement.html
Normal file
24
test/ecmascript/assert/document.documentElement.html
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!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.innerHTML;
|
||||||
|
console.assert(x.startsWith('<HEAD></HEAD><BODY id="test">'), 'head was added');
|
||||||
|
}
|
||||||
|
|
||||||
|
console.error('document.documentElement.html');
|
||||||
|
myFunction();
|
||||||
|
console.exit(0);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user