Skip to content

Commit

Permalink
[e] (0) xref Range members
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=9489

git-svn-id: http://svn.whatwg.org/webapps@5029 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 13, 2010
1 parent c441d7c commit 4a05e6b
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 47 deletions.
50 changes: 33 additions & 17 deletions complete.html
Expand Up @@ -3208,6 +3208,22 @@ <h4 id=dependencies><span class=secno>2.2.1 </span>Dependencies</h4>

<li><dfn id=dom-event-target title=dom-Event-target><code>target</code></dfn> attribute</li>

</ul><p>The following features are defined in the DOM
Range specification: <a href=#refsDOMRANGE>[DOMRANGE]</a></p>

<ul class=brief><li><dfn id=range><code>Range</code></dfn> interface</li>

<li><dfn id=dom-range-deletecontents title=dom-Range-deleteContents><code>deleteContents()</code></dfn> method </li>
<li><dfn id=dom-range-selectnodecontents title=dom-Range-selectNodeContents><code>selectNodeContents()</code></dfn> method </li>
<li><dfn id=dom-range-setend title=dom-Range-setEnd><code>setEnd()</code></dfn> method </li>
<li><dfn id=dom-range-setstart title=dom-Range-setStart><code>setStart()</code></dfn> method </li>

<li><dfn id=dom-range-collapsed title=dom-Range-collapsed><code>collapsed</code></dfn> attribute </li>
<li><dfn id=dom-range-endcontainer title=dom-Range-endContainer><code>endContainer</code></dfn> attribute </li>
<li><dfn id=dom-range-endoffset title=dom-Range-endOffset><code>endOffset</code></dfn> attribute </li>
<li><dfn id=dom-range-startcontainer title=dom-Range-startContainer><code>startContainer</code></dfn> attribute </li>
<li><dfn id=dom-range-startoffset title=dom-Range-startOffset><code>startOffset</code></dfn> attribute </li>

</ul></dd>

<dt>Web IDL</dt>
Expand Down Expand Up @@ -62436,13 +62452,13 @@ <h4 id=documentSelection><span class=secno>8.6.1 </span>APIs for the browsing co
-->

<p>The <code><a href=#selection-0>Selection</a></code> interface represents a list of
<code>Range</code> objects. The first item in the list has index 0,
<code><a href=#range>Range</a></code> objects. The first item in the list has index 0,
and the last item has index <var title="">count</var>-1, where <var title="">count</var> is the number of ranges in the list. <a href=#refsDOMRANGE>[DOMRANGE]</a></p>

<p>All of the members of the <code><a href=#selection-0>Selection</a></code> interface are
defined in terms of operations on the <code>Range</code> objects
defined in terms of operations on the <code><a href=#range>Range</a></code> objects
represented by this object. These operations can raise exceptions,
as defined for the <code>Range</code> interface; this can therefore
as defined for the <code><a href=#range>Range</a></code> interface; this can therefore
result in the members of the <code><a href=#selection-0>Selection</a></code> interface
raising exceptions as well, in addition to any explicitly called out
below.</p>
Expand Down Expand Up @@ -62588,26 +62604,26 @@ <h4 id=documentSelection><span class=secno>8.6.1 </span>APIs for the browsing co
</dl><div class=impl>

<p>The <dfn id=dom-selection-anchornode title=dom-selection-anchorNode><code>anchorNode</code></dfn>
attribute must return the value returned by the <code title="">startContainer</code> attribute of the last
<code>Range</code> object in the list, or null if the list is
attribute must return the value returned by the <code title=dom-Range-startContainer><a href=#dom-range-startcontainer>startContainer</a></code> attribute of the last
<code><a href=#range>Range</a></code> object in the list, or null if the list is
empty.</p>

<p>The <dfn id=dom-selection-anchoroffset title=dom-selection-anchorOffset><code>anchorOffset</code></dfn>
attribute must return the value returned by the <code title="">startOffset</code> attribute of the last <code>Range</code>
attribute must return the value returned by the <code title=dom-Range-startOffset><a href=#dom-range-startoffset>startOffset</a></code> attribute of the last <code><a href=#range>Range</a></code>
object in the list, or 0 if the list is empty.</p>

<p>The <dfn id=dom-selection-focusnode title=dom-selection-focusNode><code>focusNode</code></dfn>
attribute must return the value returned by the <code title="">endContainer</code> attribute of the last
<code>Range</code> object in the list, or null if the list is
attribute must return the value returned by the <code title=dom-Range-endContainer><a href=#dom-range-endcontainer>endContainer</a></code> attribute of the last
<code><a href=#range>Range</a></code> object in the list, or null if the list is
empty.</p>

<p>The <dfn id=dom-selection-focusoffset title=dom-selection-focusOffset><code>focusOffset</code></dfn>
attribute must return the value returned by the <code title="">endOffset</code> attribute of the last <code>Range</code>
attribute must return the value returned by the <code title=dom-Range-endOffset><a href=#dom-range-endoffset>endOffset</a></code> attribute of the last <code><a href=#range>Range</a></code>
object in the list, or 0 if the list is empty.</p>

<p>The <dfn id=dom-selection-iscollapsed title=dom-selection-isCollapsed><code>isCollapsed</code></dfn>
attribute must return true if there are zero ranges, or if there is
exactly one range and its <code title="">collapsed</code> attribute
exactly one range and its <code title=dom-Range-collapsed><a href=#dom-range-collapsed>collapsed</a></code> attribute
is itself true. Otherwise it must return false.</p>

<p>The <dfn id=dom-selection-collapse title=dom-selection-collapse><code>collapse(<var title="">parentNode</var>, <var title="">offset</var>)</code></dfn>
Expand All @@ -62616,31 +62632,31 @@ <h4 id=documentSelection><span class=secno>8.6.1 </span>APIs for the browsing co
<code><a href=#htmldocument>HTMLDocument</a></code> object with which the
<code><a href=#selection-0>Selection</a></code> object is associated. Otherwise it is, and
the method must remove all the ranges in the <code><a href=#selection-0>Selection</a></code>
list, then create a new <code>Range</code> object, add it to the
list, and invoke its <code title="">setStart()</code> and <code title="">setEnd()</code> methods with the <var title="">parentNode</var> and <var title="">offset</var> values as
list, then create a new <code><a href=#range>Range</a></code> object, add it to the
list, and invoke its <code title=dom-Range-setStart()>setStart()</code> and <code title=dom-Range-setEnd()>setEnd()</code> methods with the <var title="">parentNode</var> and <var title="">offset</var> values as
their arguments.</p>

<p>The <dfn id=dom-selection-collapsetostart title=dom-selection-collapseToStart><code>collapseToStart()</code></dfn>
method must raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> DOM exception if
there are no ranges in the list. Otherwise, it must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
<code title="">startContainer</code> and <code title="">startOffset</code> values of the first <code>Range</code>
<code title=dom-Range-startContainer><a href=#dom-range-startcontainer>startContainer</a></code> and <code title=dom-Range-startOffset><a href=#dom-range-startoffset>startOffset</a></code> values of the first <code><a href=#range>Range</a></code>
object in the list as the arguments.</p>

<p>The <dfn id=dom-selection-collapsetoend title=dom-selection-collapseToEnd><code>collapseToEnd()</code></dfn>
method must raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> DOM exception if
there are no ranges in the list. Otherwise, it must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
<code title="">endContainer</code> and <code title="">endOffset</code> values of the last <code>Range</code>
<code title=dom-Range-endContainer><a href=#dom-range-endcontainer>endContainer</a></code> and <code title=dom-Range-endOffset><a href=#dom-range-endoffset>endOffset</a></code> values of the last <code><a href=#range>Range</a></code>
object in the list as the arguments.</p>

<p>The <dfn id=dom-selection-selectallchildren title=dom-selection-selectAllChildren><code>selectAllChildren(<var title="">parentNode</var>)</code></dfn>
method must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
<var title="">parentNode</var> value as the first argument and 0 as the
second argument, and must then invoke the <code title="">selectNodeContents()</code> method on the first (and only)
second argument, and must then invoke the <code title=dom-Range-selectNodeContents()>selectNodeContents()</code> method on the first (and only)
range in the list with the <var title="">parentNode</var> value as the
argument.</p>

<p>The <dfn id=dom-selection-deletefromdocument title=dom-selection-deleteFromDocument><code>deleteFromDocument()</code></dfn>
method must invoke the <code title="">deleteContents()</code> method
method must invoke the <code title=dom-Range-deleteContents()>deleteContents()</code> method
on each range in the list, if any, from first to last.</p>

<p>The <dfn id=dom-selection-rangecount title=dom-selection-rangeCount><code>rangeCount</code></dfn>
Expand Down Expand Up @@ -62674,7 +62690,7 @@ <h4 id=documentSelection><span class=secno>8.6.1 </span>APIs for the browsing co

<p>Objects implementing this interface must <dfn id=dom-selection-tostring title=dom-selection-toString>stringify</dfn> to a concatenation
of the results of invoking the <code title="">toString()</code>
method of the <code>Range</code> object on each of the ranges of the
method of the <code><a href=#range>Range</a></code> object on each of the ranges of the
selection, in the order they appear in the list (first to last).</p>

</div>
Expand Down
50 changes: 33 additions & 17 deletions index
Expand Up @@ -3106,6 +3106,22 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<li><dfn id=dom-event-target title=dom-Event-target><code>target</code></dfn> attribute</li>

</ul><p>The following features are defined in the DOM
Range specification: <a href=#refsDOMRANGE>[DOMRANGE]</a></p>

<ul class=brief><li><dfn id=range><code>Range</code></dfn> interface</li>

<li><dfn id=dom-range-deletecontents title=dom-Range-deleteContents><code>deleteContents()</code></dfn> method </li>
<li><dfn id=dom-range-selectnodecontents title=dom-Range-selectNodeContents><code>selectNodeContents()</code></dfn> method </li>
<li><dfn id=dom-range-setend title=dom-Range-setEnd><code>setEnd()</code></dfn> method </li>
<li><dfn id=dom-range-setstart title=dom-Range-setStart><code>setStart()</code></dfn> method </li>

<li><dfn id=dom-range-collapsed title=dom-Range-collapsed><code>collapsed</code></dfn> attribute </li>
<li><dfn id=dom-range-endcontainer title=dom-Range-endContainer><code>endContainer</code></dfn> attribute </li>
<li><dfn id=dom-range-endoffset title=dom-Range-endOffset><code>endOffset</code></dfn> attribute </li>
<li><dfn id=dom-range-startcontainer title=dom-Range-startContainer><code>startContainer</code></dfn> attribute </li>
<li><dfn id=dom-range-startoffset title=dom-Range-startOffset><code>startOffset</code></dfn> attribute </li>

</ul></dd>

<dt>Web IDL</dt>
Expand Down Expand Up @@ -62363,13 +62379,13 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {
-->

<p>The <code><a href=#selection-0>Selection</a></code> interface represents a list of
<code>Range</code> objects. The first item in the list has index 0,
<code><a href=#range>Range</a></code> objects. The first item in the list has index 0,
and the last item has index <var title="">count</var>-1, where <var title="">count</var> is the number of ranges in the list. <a href=#refsDOMRANGE>[DOMRANGE]</a></p>

<p>All of the members of the <code><a href=#selection-0>Selection</a></code> interface are
defined in terms of operations on the <code>Range</code> objects
defined in terms of operations on the <code><a href=#range>Range</a></code> objects
represented by this object. These operations can raise exceptions,
as defined for the <code>Range</code> interface; this can therefore
as defined for the <code><a href=#range>Range</a></code> interface; this can therefore
result in the members of the <code><a href=#selection-0>Selection</a></code> interface
raising exceptions as well, in addition to any explicitly called out
below.</p>
Expand Down Expand Up @@ -62515,26 +62531,26 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {
</dl><div class=impl>

<p>The <dfn id=dom-selection-anchornode title=dom-selection-anchorNode><code>anchorNode</code></dfn>
attribute must return the value returned by the <code title="">startContainer</code> attribute of the last
<code>Range</code> object in the list, or null if the list is
attribute must return the value returned by the <code title=dom-Range-startContainer><a href=#dom-range-startcontainer>startContainer</a></code> attribute of the last
<code><a href=#range>Range</a></code> object in the list, or null if the list is
empty.</p>

<p>The <dfn id=dom-selection-anchoroffset title=dom-selection-anchorOffset><code>anchorOffset</code></dfn>
attribute must return the value returned by the <code title="">startOffset</code> attribute of the last <code>Range</code>
attribute must return the value returned by the <code title=dom-Range-startOffset><a href=#dom-range-startoffset>startOffset</a></code> attribute of the last <code><a href=#range>Range</a></code>
object in the list, or 0 if the list is empty.</p>

<p>The <dfn id=dom-selection-focusnode title=dom-selection-focusNode><code>focusNode</code></dfn>
attribute must return the value returned by the <code title="">endContainer</code> attribute of the last
<code>Range</code> object in the list, or null if the list is
attribute must return the value returned by the <code title=dom-Range-endContainer><a href=#dom-range-endcontainer>endContainer</a></code> attribute of the last
<code><a href=#range>Range</a></code> object in the list, or null if the list is
empty.</p>

<p>The <dfn id=dom-selection-focusoffset title=dom-selection-focusOffset><code>focusOffset</code></dfn>
attribute must return the value returned by the <code title="">endOffset</code> attribute of the last <code>Range</code>
attribute must return the value returned by the <code title=dom-Range-endOffset><a href=#dom-range-endoffset>endOffset</a></code> attribute of the last <code><a href=#range>Range</a></code>
object in the list, or 0 if the list is empty.</p>

<p>The <dfn id=dom-selection-iscollapsed title=dom-selection-isCollapsed><code>isCollapsed</code></dfn>
attribute must return true if there are zero ranges, or if there is
exactly one range and its <code title="">collapsed</code> attribute
exactly one range and its <code title=dom-Range-collapsed><a href=#dom-range-collapsed>collapsed</a></code> attribute
is itself true. Otherwise it must return false.</p>

<p>The <dfn id=dom-selection-collapse title=dom-selection-collapse><code>collapse(<var title="">parentNode</var>, <var title="">offset</var>)</code></dfn>
Expand All @@ -62543,31 +62559,31 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {
<code><a href=#htmldocument>HTMLDocument</a></code> object with which the
<code><a href=#selection-0>Selection</a></code> object is associated. Otherwise it is, and
the method must remove all the ranges in the <code><a href=#selection-0>Selection</a></code>
list, then create a new <code>Range</code> object, add it to the
list, and invoke its <code title="">setStart()</code> and <code title="">setEnd()</code> methods with the <var title="">parentNode</var> and <var title="">offset</var> values as
list, then create a new <code><a href=#range>Range</a></code> object, add it to the
list, and invoke its <code title=dom-Range-setStart()>setStart()</code> and <code title=dom-Range-setEnd()>setEnd()</code> methods with the <var title="">parentNode</var> and <var title="">offset</var> values as
their arguments.</p>

<p>The <dfn id=dom-selection-collapsetostart title=dom-selection-collapseToStart><code>collapseToStart()</code></dfn>
method must raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> DOM exception if
there are no ranges in the list. Otherwise, it must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
<code title="">startContainer</code> and <code title="">startOffset</code> values of the first <code>Range</code>
<code title=dom-Range-startContainer><a href=#dom-range-startcontainer>startContainer</a></code> and <code title=dom-Range-startOffset><a href=#dom-range-startoffset>startOffset</a></code> values of the first <code><a href=#range>Range</a></code>
object in the list as the arguments.</p>

<p>The <dfn id=dom-selection-collapsetoend title=dom-selection-collapseToEnd><code>collapseToEnd()</code></dfn>
method must raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> DOM exception if
there are no ranges in the list. Otherwise, it must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
<code title="">endContainer</code> and <code title="">endOffset</code> values of the last <code>Range</code>
<code title=dom-Range-endContainer><a href=#dom-range-endcontainer>endContainer</a></code> and <code title=dom-Range-endOffset><a href=#dom-range-endoffset>endOffset</a></code> values of the last <code><a href=#range>Range</a></code>
object in the list as the arguments.</p>

<p>The <dfn id=dom-selection-selectallchildren title=dom-selection-selectAllChildren><code>selectAllChildren(<var title="">parentNode</var>)</code></dfn>
method must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
<var title="">parentNode</var> value as the first argument and 0 as the
second argument, and must then invoke the <code title="">selectNodeContents()</code> method on the first (and only)
second argument, and must then invoke the <code title=dom-Range-selectNodeContents()>selectNodeContents()</code> method on the first (and only)
range in the list with the <var title="">parentNode</var> value as the
argument.</p>

<p>The <dfn id=dom-selection-deletefromdocument title=dom-selection-deleteFromDocument><code>deleteFromDocument()</code></dfn>
method must invoke the <code title="">deleteContents()</code> method
method must invoke the <code title=dom-Range-deleteContents()>deleteContents()</code> method
on each range in the list, if any, from first to last.</p>

<p>The <dfn id=dom-selection-rangecount title=dom-selection-rangeCount><code>rangeCount</code></dfn>
Expand Down Expand Up @@ -62601,7 +62617,7 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {

<p>Objects implementing this interface must <dfn id=dom-selection-tostring title=dom-selection-toString>stringify</dfn> to a concatenation
of the results of invoking the <code title="">toString()</code>
method of the <code>Range</code> object on each of the ranges of the
method of the <code><a href=#range>Range</a></code> object on each of the ranges of the
selection, in the order they appear in the list (first to last).</p>

</div>
Expand Down

0 comments on commit 4a05e6b

Please sign in to comment.