Re: [whatwg/dom] Further Attr node fixes for compareDocumentPosition() (#312)

>  
> - <li><p>If <var>node1</var> is a <a>descendant</a> of <var>node2</var>, then return the result of
> - adding {{Node/DOCUMENT_POSITION_CONTAINED_BY}} to {{Node/DOCUMENT_POSITION_FOLLOWING}}.
> + <li><p>If <var>node1</var> is a <a>descendant</a> of <var>node2</var>, or <var>node1</var> is
> + <var>node2</var> and <var>attr1</var> is non-null, then return the result of adding
> + {{Node/DOCUMENT_POSITION_CONTAINED_BY}} to {{Node/DOCUMENT_POSITION_FOLLOWING}}.
>  
>   <li><p>If <var>node1</var> is <a>preceding</a> <var>node2</var>, then return

A  note around here that explains that we can end up here for attributes and that they are considered to come before the real descendants would be nice, since it's going to be impossible to extract intention from the algorithm alone.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/312/files/96cb8745f57621bb3a5effe9211baf96f52c5849#r76778121

Received on Tuesday, 30 August 2016 11:39:09 UTC