- From: Jonathan Neal <notifications@github.com>
- Date: Mon, 17 Jul 2017 19:43:28 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 18 July 2017 02:43:55 UTC
The **ParentNode.wrap()** method would replace a node with the parent node, appending the replaced node to the parent node. ### Syntax ```js ParentNode.wrap(node); ``` ### Rationale: Like `childNode.remove()`, we’re de-complicating the process of wrapping a node, e.g.: ```js if (node.parentNode) { node.parentNode.insertBefore(parentNode, node).appendChild(node); } ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/479
Received on Tuesday, 18 July 2017 02:43:55 UTC