-
Notifications
You must be signed in to change notification settings - Fork 313
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
Add Rml::Element::Matches
function
#573
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request! Looks good, I like it. And a documentation PR already as well, nice.
Could you add some unit tests as well? Please take a look at Selectors.cpp
.
I added a quick harness and a few tests; I'm not great at unit testing because it tends to just be things that I need that I check for, heh. |
I think these tests look good. It tests the unique functionality of this function. The specific matching behavior is also shared with the other tests, so we don't need to go into full detail (although it wouldn't hurt either). Just a couple minor comments, and I'm ready to merge this. |
Fair enough! I also have |
Nice, this looks good to me! Thanks for the pull request, very much appreciated :) |
This PR adds a simple function to mirror https://developer.mozilla.org/en-US/docs/Web/API/Element/matches in RmlUi; it was the only missing selector-related function in Element