[whatwg/dom] https://dom.spec.whatwg.org/#dom-range-deletecontents may collapse the Range to an invalid position (Issue #1446)

smaug---- created an issue (whatwg/dom#1446)

### What is the issue with the DOM Standard?

Step 9: _For each node of nodesToRemove, in [tree order](https://dom.spec.whatwg.org/#concept-tree-order): [remove](https://dom.spec.whatwg.org/#concept-node-remove) node._
may modify DOM
and then step 11 does just _Set [start](https://dom.spec.whatwg.org/#concept-range-start) and [end](https://dom.spec.whatwg.org/#concept-range-end) to (newNode, newOffset)._
and those newNode and newOffset were calculated before removal.

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

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

Received on Wednesday, 21 January 2026 22:24:30 UTC