1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
elinks/test/ecmascript/replaceWith.html

10 lines
264 B
HTML
Raw Normal View History

2022-11-17 12:41:40 -05:00
<script>
var div = document.createElement("div");
var p = document.createElement("p");
p = div.appendChild(p); // TODO without assignment
var span = document.createElement("span");
2022-11-17 12:41:40 -05:00
p.replaceWith(span);
alert(div.outerHTML); //'<div><span></span></div>'
</script>