replaceWith

replaceWith replaces the node with nodes, while replacing strings in the nodes with equivalent text nodes.

Syntax

node.replaceWith(...nodes)

Examples

1

2

3

4

5

6

7

Internal

after

before

remove

External

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu