Re: [whatwg/dom] Add OpaqueRange interface (PR #1404)

@annevk commented on this pull request.

I also think we can make "live range" work for both objects. I will do another patch to make that work.



> +<a for=OpaqueRange>exposed start offset</a>.
+</div>
+
+<div algorithm="OpaqueRange get end offset">
+<p>The <a for=AbstractRange>get end offset</a> steps are to return <a>this</a>'s
+<a for=OpaqueRange>exposed end offset</a>.
+</div>
+
+<div algorithm="OpaqueRange get collapsed">
+<p>The <a for=AbstractRange>get collapsed</a> steps are to return true if <a>this</a>'s
+<a for=OpaqueRange>exposed start offset</a> is its <a for=OpaqueRange>exposed end offset</a>;
+otherwise false.
+</div>
+
+<p>The {{OpaqueRange/getClientRects()}} and {{OpaqueRange/getBoundingClientRect()}} methods are
+defined in [[CSSOM-VIEW]].

We should probably stay consistent then and not add them to the IDL here.

> @@ -8609,11 +8612,12 @@ range.setEnd(secondText, 4)
 <a>node tree</a> above cannot be represented by a <a>range</a>. <a>Ranges</a> are only useful for
 <a for=/>nodes</a>.
 
-<p>{{Range}} objects, unlike {{StaticRange}} objects, are affected by mutations to the
-<a>node tree</a>. Therefore they are also known as <a>live ranges</a>. Such mutations will not
-invalidate them and will try to ensure that it still represents the same piece of content.
-Necessarily, a <a>live range</a> might itself be modified as part of the mutation to the
-<a>node tree</a> when, e.g., part of the content it represents is mutated.
+<p>{{Range}} and {{OpaqueRange}} objects, unlike {{StaticRange}} objects, are affected by mutations
+to the <a>node tree</a>. Therefore they are also known as <a>live ranges</a> and
+<a>opaque ranges</a>, respectively. Such mutations will not invalidate them and will try to ensure

This "Therefore" sentence doesn't make sense.

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

Message ID: <whatwg/dom/pull/1404/review/5736980951@github.com>

Received on Monday, 2 November 2026 13:52:52 UTC