- From: Ryosuke Niwa <notifications@github.com>
- Date: Wed, 15 Feb 2017 19:15:38 -0800
- To: w3c/selection-api <selection-api@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 16 February 2017 03:16:14 UTC
rniwa commented on this pull request.
> @@ -302,25 +302,31 @@
<dt><dfn>addRange</dfn></dt>
<dd>
- <p>The method must set the <a>context object</a>'s range to <var>range</var> by a strong reference (not by making a copy)
- if the <dfn><a href="http://www.w3.org/TR/dom/#concept-tree-root">root</a></dfn> ([[!DOM4]])
- of the <var>range</var>'s boundary points are the <a>document</a> associated with <a>context object</a>.
- Otherwise, this method must do nothing.</p>
-
+ <p>The method must follow these steps:</p>
+ <ol>
+ <li>If the <dfn><a href="http://www.w3.org/TR/dom/#concept-tree-root">root</a></dfn> ([[!DOM4]])
+ of the <var>range</var>'s boundary points are not the <a>document</a> associated with <a>context object</a>,
+ abort these steps.</li>
+ <li>if <code>rangeCount</code> is <code>0</code>, set the <a>context object</a>'s range to <var>range</var>
Please reverse this step so that when `rangeCount` is not 0, we abort these steps.
So that these two if's have a consistent semantics (both aborts when the condition is matched).
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/pull/81#pullrequestreview-22166093
Received on Thursday, 16 February 2017 03:16:14 UTC