-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to select by a property? #5
Comments
Property selector is not supported, as it will affect performance dramatically.
|
Thanks for reply. I think it would not be bad even if it was affecting performance (optional use -- optional performance decrease). |
+1, I have several use cases where attribute query is not required, but there are a few which I really need, making it optional seems good to me. |
It's possible to write a custom query function. The main reason for not supporting this natively is that this requires parsing attributes before querying, which slows everything down, and there are many different matching methods for attributes (eg. |
I do agree with @ashi009 . but sometimes we indeed need the attribute query, i suggest maybe we could parse some attibutes user given when they call the parse method, not all the attributes. |
parse value-less attributes
Thanks for making this package. It does work easily using selectors but I don't understand what's a simple way to select a node by node name and attribute (jQuery style), e.g.
<meta property="og:title" content="Apple iPad mini 4 128Gb WiFi+4G Gold (MK782)">
I tried
parsed.querySelectorAll('meta[property="og:title"]')
but it retuens empty result.The text was updated successfully, but these errors were encountered: