[whatwg/dom] Prepare for OpaqueRange (PR #1470)

Introduce NodeRange between AbstractRange and StaticRange/Range and move *Container members there.

Also make it possible for NodeRange and a future OpaqueRange to return different values for *Offset and collapsed members by making them return the result of an internal algorithm.

We keep start/end/start node/etc. on AbstractRange as OpaqueRange will need those to be the same (it will be manipulated just like live ranges are). Technically OpaqueRange is a node range as well, this is just not exposed to the outside world.


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***

### :boom: Error: 422 Unprocessable Entity :boom: ###

[PR Preview](https://github.com/tobie/pr-preview#pr-preview) failed to build. _(Last tried on Jun 7, 2026, 9:28 AM UTC)_.

<details>
<summary>More</summary>


PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

:rotating_light: [Spec Generator](https://www.w3.org/publications/spec-generator/) - Spec Generator is the web service used to build bikeshed/ReSpec specs

:link: [Related URL](https://www.w3.org/publications/spec-generator/?type=bikeshed-spec&output=html&url=https%3A%2F%2Fraw.githubusercontent.com%2Fwhatwg%2Fdom%2F4a83d3458b5724a1044b1a0cb6be5b32ac0d68ef%2Fdom.bs&force=1&md-status=LS-PR&md-Text-Macro=PR-NUMBER%201470)

**Error output:**

```json
[
    {
        "lineNum": "8769:1",
        "messageType": "fatal",
        "text": "Algorithm container has no name, and there is no <dfn> to infer one from. Please set the algorithm='name here' attribute."
    },
    {
        "lineNum": "8774:1",
        "messageType": "fatal",
        "text": "Algorithm container has no name, and there is no <dfn> to infer one from. Please set the algorithm='name here' attribute."
    },
    {
        "lineNum": "8779:1",
        "messageType": "fatal",
        "text": "Algorithm container has no name, and there is no <dfn> to infer one from. Please set the algorithm='name here' attribute."
    },
    {
        "lineNum": null,
        "messageType": "fatal",
        "text": "Multiple declarations of the '' algorithm."
    },
    {
        "lineNum": null,
        "messageType": "failure",
        "text": "Did not generate, due to errors exceeding the allowed error level."
    }
]
```

_This seems to be an issue with the [Spec Generator](https://www.w3.org/publications/spec-generator/) service. PR Preview doesn't manage this service and so has no control over it. If you've identified an issue with it, you can [report the issue to the maintainers of Spec Generator](https://github.com/w3c/spec-generator/issues/new) directly. Please be courteous. Thank you!_

_If you don't have enough information above to solve the error by yourself or if the issue doesn't seem related to Spec Generator, you can [file an issue with PR Preview](https://github.com/tobie/pr-preview/issues/new?title=Unidentified%20Error&body=See%20whatwg/dom%231470.)._

</details>

You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/dom/pull/1470

-- Commit Summary --

  * Prepare for OpaqueRange

-- File Changes --

    M dom.bs (79)

-- Patch Links --

https://github.com/whatwg/dom/pull/1470.patch
https://github.com/whatwg/dom/pull/1470.diff

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

Message ID: <whatwg/dom/pull/1470@github.com>

Received on Sunday, 7 June 2026 09:29:09 UTC