1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00
elinks/test/js/replaceWith.html
2024-09-24 21:43:10 +02:00

10 lines
264 B
HTML

<script>
var div = document.createElement("div");
var p = document.createElement("p");
p = div.appendChild(p); // TODO without assignment
var span = document.createElement("span");
p.replaceWith(span);
alert(div.outerHTML); //'<div><span></span></div>'
</script>