diff --git a/index.html b/index.html index 0156d4b..c83cb48 100644 --- a/index.html +++ b/index.html @@ -144,7 +144,7 @@
+ anchor and focus of selection need not to be + in the [=document tree=]. It could be in a [=shadow tree=] of + the same [=document=]. +
The attribute must return the anchor [=boundary point/node=] - of [=this=], or `null` if the anchor is null. + of [=this=], or `null` if the anchor is null or anchor + is not in the [=document tree=].
The attribute must return the anchor [=boundary
point/offset=] of [=this=], or 0
if the anchor
- is null.
+ is null or anchor is not in the [=document tree=].
The attribute must return the focus [=boundary point/node=] - of [=this=], or `null` if the focus is null. + of [=this=], or `null` if the focus is null or focus + is not in the [=document tree=].
The attribute must return the focus [=boundary
point/offset=] of [=this=], or 0
if the focus
- is null.
+ is null or focus is not in the [=document tree=].
The attribute must return 0
if [=this=] is
- empty, and must return 1
otherwise.
+ empty or either focus or anchor is not in the
+ [=document tree=], and must return 1
otherwise.
- The attribute must return `"None"` if [=this=] is empty, + The attribute must return `"None"` if [=this=] is empty or + either focus or anchor is not in the [=document tree=], `"Caret"` if [=this=]'s range is [=range/collapsed=], and `"Range"` otherwise.
@@ -287,7 +297,8 @@
The method must throw an {{IndexSizeError}} exception if
index is not 0
, or if [=this=] is
- empty. Otherwise, it must return a reference to (not a copy
+ empty or either focus or anchor is not in the
+ [=document tree=]. Otherwise, it must return a reference to (not a copy
of) [=this=]'s range.
@@ -361,7 +372,7 @@
@@ -369,6 +380,37 @@
removeAllRanges()
.
The method must invoke {{Range/deleteContents()}} on [=this=]'s - range if [=this=] is not empty. Otherwise the method - must do nothing. + range if [=this=] is not empty and both focus and anchor + are in the [=document tree=]. Otherwise the method must do nothing.
This is the one method that actually mutates the range instead of @@ -820,13 +862,35 @@
+ When the user agent is to [=replace data=] or [=CharacterData/substring data=] on {{CharacterData}}, + the user agent must update the range associated with selection of the [=Node/node document=] + of the {{CharacterData}} as if it's a live range. +
++ When the user agent is to split a {{Text}} [=node=], the user agent must update the range associated with + selection of the [=Node/node document=] of the {{Text}} as if it's a live range. +
+
+ When the user agent is to run steps for normalize()
method, the user agent must update
+ the range associated with selection of the [=Node/node document=] of [=this=] as if it's a live range.
+
+ When the user agent is to [=remove=] or [=insert=] a [=node=], the user agent must update + the range associated with selection of the [=Node/node document=] of the [=node=] as if it's a live range. +
+The user agent should allow the user to change the selection - associated with the active document. If the user makes any + associated with the [=navigable/active document=]. If the user makes any modification to a selection, the user agent must create a new range with suitable [=range/start=] and [=range/end=] of the range and associate the selection with this new