- From: liorean <liorean@gmail.com>
- Date: Wed, 12 Mar 2008 23:13:27 +0100
- To: "Web APIs WG (public)" <public-webapi@w3.org>
>From earlier discussion on this topic I got the impression that the intention for the ElementSelector interface was that it would still be document-rooted. In other words, if you have a selector ":root descendant" and operate on an element that is not the documentElement, but which has a descendant child, then the descendant child will match. In this traversal scheme, querying the selector is still done from the document node, just excluding all subtrees except for the subtree of the element we're querying on. Another alternative is of course to do the matching backwards, beginning with trying to match the last simple selector in the selectors on each of the elements of the subtree in question, then traversing the tree in upwards direction. The first traversal scheme would never match disconnected nodes. The second would, however. Then there's of course a possibility to create a hybrid version of these approaches. -- David "liorean" Andersson
Received on Wednesday, 12 March 2008 22:13:40 UTC