Re: [w3c/selection-api] the steps of Selection.extend() does not check whether the given offset is valid in the container (Issue #353)

masayuki-nakano left a comment (w3c/selection-api#353)

Oh, and also these things should be checked too:
1. If node is null, this method must behave identically as removeAllRanges() and abort these steps.
2. If node is a [DocumentType](https://dom.spec.whatwg.org/#documenttype), throw an [InvalidNodeTypeError](https://webidl.spec.whatwg.org/#invalidnodetypeerror) exception and abort these steps.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/issues/353#issuecomment-3726634494
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/selection-api/issues/353/3726634494@github.com>

Received on Friday, 9 January 2026 01:13:35 UTC