- From: Stephanie Zhang <notifications@github.com>
- Date: Mon, 29 Sep 2025 11:21:42 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1404/review/3281151823@github.com>
@stephanieyzhang commented on this pull request. > + "{{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> > <var>len</var> or <var>end</var> > <var>len</var>, then + <a>throw</a> an "{{IndexSizeError!!exception}}" {{DOMException}}.</li> + <li>If <var>start</var> > <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 +{{AbstractRange/startOffset}} and {{AbstractRange/endOffset}} are updated automatically +to preserve the same logical content. These behaviors mirror {{Range}} boundary adjustments +in the DOM, but are applied to the UTF-16 code units of a form control’s value.</p> + +<ul> Added a TODO to update this once HTML spec changes are made -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1404#discussion_r2388841601 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1404/review/3281151823@github.com>
Received on Monday, 29 September 2025 18:21:46 UTC