Re: [w3c/selection-api] Change Selection to be associated with a composed live range (PR #345)

@dizhang168 commented on this pull request.



> -            The method must throw {{InvalidStateError}} exception if the
-            [=this=] is <a>empty</a>. Otherwise, it must create a new
-            <a>range</a>, [=Range/set the start=] both its [=range/start=] and
-            [=range/end=] to the [=range/end=] of [=this=]'s <a>range</a>, and
-            then set [=this=]'s <a>range</a> to the newly-created <a>range</a>.
-          </p>
+         <p>
+          The method must follow these steps:
+         </p>
+         <ol>
+          <li>If [=this=] is <a>empty</a>, throw an {{InvalidStateError}}
+          exception and abort these steps.
+          </li>
+          <li>Let <var>bp</var> be the [=Range/end=] of [=this=]'s <a>range</a>.
+          </li>
+          <li><a>Set the composed selection range</a> with <var>bp</var> and

I have updated collapseToStart/collapseToEnd as well as many other definitions to use uncomposed range.

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

Message ID: <w3c/selection-api/pull/345/review/2727069143@github.com>

Received on Friday, 28 March 2025 23:45:34 UTC