Closed tqwewe closed 7 years ago
Cascadia, like the CSS spec, only supports selectors which can be expressed as a simple yes/no question about an element. (See the definition of the Selector type: func(*html.Node) bool
.) Some jQuery extensions, such as this one, only work relative to a context. (In this case, do we want the first 3 matches in the whole document, or only in a certain subtree?) So implementing them would require a complete rewrite.
I'm not necessarily opposed to adding jQuery extensions. Cascadia already has some of them. But some (like this one) are incompatible with the basic design.
Ah okay, I understand. It would just be a handy feature if it were possible to be implemented (without changing the whole package around)
Cascadia doesn't currently support the jQuery lt selector which would be a nice feature to see.
Here is a stack overflow question explaining this feature in detail: http://stackoverflow.com/questions/14005796/jquery-limit-element-query-results
I posted this same issue here on the GoQuery package's issues and was advised to post this issue/feature request here as GoQuery uses cascadia as it's CSS selector.