Andrew Dupont wrote: > ... > Also, selectors with pseudoelements (e.g., div:first-child) are > conspicuously absent. Whoever feels like writing the requisite > regexen would be my friend for life. > > ... Do you have a list of pseudo-elements you want to support?
Do you want to address state-dependent pseudo-elements at all (:visited, :active, etc.)? It can be done through some trickery, but I don't know the value of it: http://www.gnucitizen.org/projects/javascript-visited-link-scanner/. Do we want to address pseudo-elements that normally refer to text nodes or fragments such as :first-letter, :first-line, and ::selection? My feeling is that the list of possibly supported psuedo-elements is something like the following-- :not(s) :empty :first-child :last-child :only-child :nth-child(n) :nth-last-child(n) :first-of-type :last-of-type :nth-of-type(n) :nth-last-of-type(n) :target :enabled :disabled :checked (see http://www.456bereastreet.com/archive/200601/css_3_selectors_explained/ and http://penguin.theopalgroup.com/cgi-bin/css3explainer/selectoracle.py) So are you asking someone to define corresponding entries in NewSelector such as NewSelector.criteria.pseudo and NewSelector.patterns.pseudo? I would guess for :empty, you might add something like this: NewSelector.criteria.empty = 'n = h.attr(n, r, "nodeValue", "", "=="); d = false;'; NewSelector.patterns.empty = /^\:empty(:?\b|$)/; Thanks, Ken Snyder --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---