Re: [whatwg/dom] compareDocumentPosition with Attr nodes still not quite right (#309)

They can both start out as attributes in step 2, but yeah, *if* they're attached to elements then *node1* and *node2* will be reassigned to those elements. So if *node1* or *node2* are attributes at step 6, then they're not attached. Saying "node1 *or* node2 are attributes" would handle detached cases, then.

Step 7 or 8 would still need some tweaking, I presume. Since you reverse engineered Gecko, I think that it all follows from "If there is an owner element *add the attribute to the chain* and walk up to the element" (my emphasis).

-- 
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/issues/309#issuecomment-241684211

Received on Tuesday, 23 August 2016 09:59:23 UTC