Re: [whatwg/dom] Proposal: A Range.prototype.replaceContents(...) (#837)

I stumbled on this page while googling for replacing the elements of a range.
Would this be a viable workaround, or does it have caveats needed to be considered?

```js
const documentFragment = range.extractContents();
documentFragment.replaceChildren(newNodes);
range.insertNode(documentFragment);
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/837#issuecomment-1449099043
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/837/1449099043@github.com>

Received on Tuesday, 28 February 2023 23:50:30 UTC