Add boolean matches(String selectors) method#10314
Add boolean matches(String selectors) method#10314Greunlis wants to merge 1 commit intogwtproject:mainfrom
Conversation
|
Thanks for the submission - at the very least, we would want to have tests to accompany it. I would also be concerned about a caller who cannot tell if "false" means "doesn't match" or "matches, but the method doesn't exist". Note however that this is already supported in Does it make sense to just use elemental2 for your use cases where modern APIs are required? |
|
Thanks for pointing me to elemental2! Adding it just for this method alone seems like an overkill, but I might find other use cases in our codebase, I'll give it some more thought and either add a test or close this pull request as unnecessary. |
I propose adding a matches method as defined here: https://developer.mozilla.org/en-US/docs/Web/API/Element/matches