Re: [w3c/selection-api] Change addRange (closes #80) (#81)

yoichio commented on this pull request.

Exchange steps

> @@ -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>

Done.

-- 
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-22184736

Received on Thursday, 16 February 2017 07:13:15 UTC