Convert to [attribute] without value
See original GitHub issueVery cool project! 💯
Is it possible to further simplify the selectors if the attribute values are different? For example the output below:
[href='https\3A \/\/www\.w3schools\.com\/css\/css_attribute_selectors\.asp'] h3
[href='https\3A \/\/developer\.mozilla\.org\/en-US\/docs\/Web\/CSS\/Attribute_selectors'] h3
[href='https\3A \/\/css-tricks\.com\/almanac\/selectors\/a\/attribute\/'] h3
Can be simplified even more like this:
[href] h3
You can replicate this as these are just title links from Google Search page.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Set attribute without value - javascript - Stack Overflow
You should use JQuery prop() method to create name-only attributes. $(body).prop('data-body', true).
Read more >How to set attribute without value using jQuery - GeeksforGeeks
There are many ways to set attributes without value using jQuery. jQuery prop() method is used to get or set the values of...
Read more >parse error [Error: Attribute without value · Issue #281 - GitHub
I have some XML which has some odd data in it, is there a way to ignore this? ... the last attribute is...
Read more >HTML value Attribute - W3Schools
For <li> elements, the value attribute sets the value of the list item (for ordered lists). The next list items will increment from...
Read more >attr() - CSS: Cascading Style Sheets - MDN Web Docs
The attr() CSS function is used to retrieve the value of an attribute of the selected element and use it in the stylesheet....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@roniemartinez I have checked the SelectorGadget. It is a UI tool for iterative building of a selector that matches multiple elements. I think you are looking for a functionality that is out of scope for this library. Something like that could probably be built on top of this library. But it was from the beginning created to produce selectors that are not fuzzy.
@fczbkk Thanks for looking into this issue.