- From: Jonathan Neal <notifications@github.com>
- Date: Tue, 18 Jul 2017 08:38:03 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 18 July 2017 15:38:31 UTC
@domenic, understood. Thank you. You’ve indicated I do not have an example for emptying documents. I’ve only needed to empty iframe documents. ```js iframe.contentDocument.empty() ``` Being fully transparent, I only do this for creating “clean” shadow-dom-like fallbacks. And, admittedly, I see people using strings (via srcdoc) for this as well: https://codepen.io/chriscoyier/pen/rwvjVN Perhaps it’s old instincts, but I really thought `target.innerHTML = ''` uses the HTML parser on `target`. I was also under the impression (from the Stack Overflow reference above regarding emptying a node with innerHTML) that this is much slower and should be avoided. My apologies if I’ve misunderstood this technology — it was not my intention. -- 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-316104219
Received on Tuesday, 18 July 2017 15:38:31 UTC