kuchiki-rs / kuchiki

(朽木) HTML/XML tree manipulation library for Rust
MIT License
470 stars 54 forks source link

Support for :contains("foo") #58

Closed kpcyrd closed 5 years ago

kpcyrd commented 5 years ago

I'm not sure if this needs to be implemented in one of the servo crates or kuchiki, but I noticed it's currently not supported and it would be very useful to have.

Thanks!

SimonSapin commented 5 years ago

:contains is not part of CSS: https://drafts.csswg.org/selectors/. I’m not even sure what it’s supposed to do.

kpcyrd commented 5 years ago

hah, oops. It seems the website I've tested this on had jquery loaded, so I didn't get the browser native $(selector) that uses css selectors, but the jquery $(selector) that uses it's own thing.

Sorry for the noise.