Skip to content

Commit 29bd4c3

Browse files
authored
Add validity criteria for StaticRange objects
1 parent f2a2ded commit 29bd4c3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

dom.bs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7650,6 +7650,21 @@ constructor steps are:
76507650
<var>init</var>["{{StaticRangeInit/endOffset}}"]).
76517651
</ol>
76527652

7653+
<p>A {{StaticRange}} is <dfn for=StaticRange export>valid</dfn> if all of the following are true:
7654+
7655+
<ul>
7656+
<li><p>Its <a for=range>start</a> and <a for=range>end</a> are in the same <a>node tree</a>.
7657+
7658+
<li><p>Its <a for=range>start offset</a> is between 0 and its <a for=range>start node</a>'s
7659+
<a>length</a>, inclusive.
7660+
7661+
<li><p>Its <a for=range>end offset</a> is between 0 and its <a for=range>end node</a>'s
7662+
<a>length</a>, inclusive.
7663+
7664+
<li><p>Its <a for=range>start</a> is <a for="boundary point">before</a> or
7665+
<a for="boundary point">equal</a> to its <a for=range>end</a>.
7666+
</ul>
7667+
76537668

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

@@ -10013,6 +10028,7 @@ Chris Paris,
1001310028
Chris Rebert,
1001410029
Cyrille Tuzi,
1001510030
Dan Burzo,
10031+
Daniel Clark,
1001610032
Daniel Glazman,
1001710033
Darin Fisher,
1001810034
David Bruant,

0 commit comments

Comments
 (0)