2024-04-12 13:23:49 -04:00
|
|
|
<!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;
|
2024-05-08 09:57:56 -04:00
|
|
|
console.assert(x.startsWith('<head></head><body id="test">'), 'head was added');
|
2024-04-12 13:23:49 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
console.error('document.documentElement.html');
|
|
|
|
myFunction();
|
2024-06-01 07:30:03 -04:00
|
|
|
console.exit();
|
2024-04-12 13:23:49 -04:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|