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

masayuki-nakano created an issue (w3c/selection-api#353)

[The collapse() method section](https://w3c.github.io/selection-api/#dom-selection-collapse) has the following:
> The method must throw an [IndexSizeError](https://webidl.spec.whatwg.org/#indexsizeerror) exception if offset is longer than node's [length](https://dom.spec.whatwg.org/#concept-node-length) and abort these steps.

However, [the extend() method section](https://w3c.github.io/selection-api/#dom-selection-extend) does not have the corresponding step.

I think that the check should be done before or after the 2nd step.

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

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

Received on Friday, 9 January 2026 01:09:36 UTC