- From: Anne van Kesteren <notifications@github.com>
- Date: Wed, 26 Jul 2017 07:33:11 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 26 July 2017 14:33:37 UTC
@pkozlowski-opensource `removeChild()` in a loop will be slower since it doesn't use the https://dom.spec.whatwg.org/#concept-node-replace-all path and therefore ends up creating way more mutation records. `textContent = ""` and `innerHTML = ""` should be equivalent in performance however and should also be the fastest. If that's not the case that'd be a bug of sorts. I would consider the latter two the current blessed way to remove all children (given the code path they take), but I can sympathize with the desire for a clearer endpoint. -- 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#issuecomment-318071597
Received on Wednesday, 26 July 2017 14:33:37 UTC