-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
prefer-query-selector: Add getElementsByName #2398
prefer-query-selector: Add getElementsByName #2398
Conversation
|
||
// No default | ||
} | ||
}; |
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.
I don't think this is safe, but I guess no one put quotes or other strange stuff in the name?
A better fix should direct update the raw string
- ('foo')
+ ('[name="foo"]')
- ("foo")
+ ("[name=\"foo\"]") // Personally, I like double quoted attribute selector.
- (`foo`)
+ (`[name="foo"]`)
Anyway, if it's hard we can leave it as is for now.
It's a little complicated and maybe too rare to be worth it, but the correct replacement for |
If it's to complicated to autofix, I suggest not having a autofixer, just the detection only. I'd certainly not do this |
I think it's fine as is for now, |
Yes, I think |
I said it's not wrong here, but |
Ah I see what you mean now. If you have multiple forms on the page with duplicate |
fixed #2374