-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
HTML: <form>'s invalid event is not to be supported #23380
Conversation
invalid.addEventListener("invalid", t.step_func(() => counter++)); | ||
invalid.oninvalid = t.step_func(() => counter++); | ||
submitter.click(); | ||
assert_equals(counter, 2); |
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.
A browser could theoretically pass this if it fired invalid at both the form and the control, but did not support the oninvalid property on either.
I think this would be better if each function pushed a unique value into an array, and then you did assert_array_equals
. Or at least two separate counters, one for the form and one for the control.
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.
Fair, pushed something better.
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.
Lovely
Also tidy up some formatting. Tests: web-platform-tests/wpt#23380. Closes #4626.
For whatwg/html#5507.