1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-18 01:26:23 -04:00
elinks/test/ecmascript/replaceWith.html
2022-11-17 18:41:40 +01:00

11 lines
240 B
HTML

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