On 15/04/2014 14:21, Andreas Tolfsen wrote:
On 15/04/2014 11:17, Anne van Kesteren wrote:
On Mon, Apr 14, 2014 at 10:54 PM, Jorge Villalobos <jo...@mozilla.com>
wrote:
FWIW, many add-ons use XPath. If there's anything we should be
recommending add-on developers to migrate to, please let me know.

It would be interesting to know what they use it for and why
querySelector() et al don't meet their needs, but there's no immediate
threat of what we have going away so it's not that important either.

There are a few use cases XPath caters for that CSS selectors can't do.
  The two predominant ones that springs to mind are finding an element
based on its text content, and finding any element relative to its
parent (or ancestor).

I'm not sure what you mean here, but I was under the impression (nay, I just tested and verified) that document.querySelector("#foo #bar") works for finding an element based on its ancestor (or parent, if you use a child rather than a descendant selector).

~ Gijs
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to