Skip to content

Commit

Permalink
Add validity criteria for StaticRange objects
Browse files Browse the repository at this point in the history
  • Loading branch information
dandclark authored Aug 31, 2021
1 parent f2a2ded commit 29bd4c3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -7650,6 +7650,21 @@ constructor steps are:
<var>init</var>["{{StaticRangeInit/endOffset}}"]).
</ol>

<p>A {{StaticRange}} is <dfn for=StaticRange export>valid</dfn> if all of the following are true:

<ul>
<li><p>Its <a for=range>start</a> and <a for=range>end</a> are in the same <a>node tree</a>.

<li><p>Its <a for=range>start offset</a> is between 0 and its <a for=range>start node</a>'s
<a>length</a>, inclusive.

<li><p>Its <a for=range>end offset</a> is between 0 and its <a for=range>end node</a>'s
<a>length</a>, inclusive.

<li><p>Its <a for=range>start</a> is <a for="boundary point">before</a> or
<a for="boundary point">equal</a> to its <a for=range>end</a>.
</ul>


<h3 id=interface-range>Interface {{Range}}</h3>

Expand Down Expand Up @@ -10013,6 +10028,7 @@ Chris Paris,
Chris Rebert,
Cyrille Tuzi,
Dan Burzo,
Daniel Clark,
Daniel Glazman,
Darin Fisher,
David Bruant,
Expand Down

0 comments on commit 29bd4c3

Please sign in to comment.