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

@stephanieyzhang commented on this pull request.



> +<code>setFormControlRange(<var>element</var>, <var>start</var>, <var>end</var>)</code></dfn>
+method steps are:</p>
+
+<ol>
+ <li>If <var>element</var> does not support form control ranges, then <a>throw</a> a
+     "{{NotSupportedError!!exception}}" {{DOMException}}.</li>
+ <li>Let <var>len</var> be the length of <var>element</var>’s <i>value string</i>.</li>
+ <li>If <var>start</var> &gt; <var>len</var> or <var>end</var> &gt; <var>len</var>, then
+     <a>throw</a> an "{{IndexSizeError!!exception}}" {{DOMException}}.</li>
+ <li>If <var>start</var> &gt; <var>end</var>, then set <var>end</var> to <var>start</var>.</li>
+ <li>Set <a for=FormControlRange>control</a> to <var>element</var>,
+     <a for=FormControlRange>start offset</a> to <var>start</var>, and
+     <a for=FormControlRange>end offset</a> to <var>end</var>.</li>
+</ol>
+
+<p>A {{FormControlRange}} is <em>live</em>: when the control’s value string changes, the range’s

Sounds good - added!

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

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

Received on Monday, 29 September 2025 17:32:15 UTC