Opened 9 years ago
Closed 5 years ago
#14683 closed feature (wontfix)
Implementation of Selectors Level 4
Reported by: | Kitson Kelly | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Query | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Is it possible to impliment the Selectors Level 4, in particular the parent selector?
The specification for parent selectors can be found here: http://www.w3.org/TR/2011/WD-selectors4-20110929/#subject
That would allow for something like:
var parents = query("$[data-dojo-type]");
To return all the immediate parents of any node with the attribute data-dojo-type
. Currently there is no way to look "upward" with the query selector syntax.
While dojo/NodeList-traverse
adds in the concept of .parent()
and .parents()
it would be useful to have the concept directly in the selectors.
Note: See
TracTickets for help on using
tickets.
The CSS working group seems to always punt on the parent or subject selector. CSS Level 4 selectors seem to be stalled (last draft in May, 2013).
While I've wanted a parent selector for more than a decade, given our approach with the lite selector engine, and leveraging querySelector/querySelectorAll, or jquery for Dojo 2, I'm going to close this.