- From: Jonathan Neal <notifications@github.com>
- Date: Mon, 17 Jul 2017 19:40:20 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 18 July 2017 02:40:46 UTC
The **ParentNode.empty()** method would remove all child nodes from the parent node. ### Syntax ```js ParentNode.empty(); ``` ### Rationale: Like `append()`, `prepend()`, `before()`, `after()`, and `replaceWith()`, we’re allowing developers to do something useful without a loop, e.g: ```js while (parentNode.lastChild) { parentNode.removeChild(parentNode.lastChild); } ``` -- 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/478
Received on Tuesday, 18 July 2017 02:40:46 UTC