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

https://software.hixie.ch/utilities/js/live-dom-viewer/saved/4411 illustrates the case I was thinking of, not sure if there are other variations.

As currently written, things first go wrong at step 6, where *node1* and *node2* may both be attributes in the same document (although as defined they don't have a root), but still the pointer compare happens. Test: https://software.hixie.ch/utilities/js/live-dom-viewer/saved/4412

With step 6 fixed somehow, yes, some tweaks to step 7 and 8 ought to do it. I'm not sure exactly what you had in mind, but it'd have to be such that an attribute is still considered contained by its element:
https://software.hixie.ch/utilities/js/live-dom-viewer/saved/4413

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

Received on Tuesday, 23 August 2016 09:44:16 UTC