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: Add a testcase for submit event reentrancy protection #16811
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.
LGTM with minor question/nit
html/semantics/forms/form-submission-0/form-submission-algorithm.html
Outdated
Show resolved
Hide resolved
let test10 = async_test('Cannot navigate (after constructing the entry list)'); | ||
test10.step(() => { | ||
|
||
async_test(t => { |
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.
Do you think this style of test is better than the counter style used above? If so, maybe add a comment?
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'd like to test which one of two click()
s submits the form. I'll add a comment.
Fixes #4620. This flag prevents reentrancy into the submission algorithm during submit or invalid events. Blink and Gecko implement this for submit only; WebKit implements it for both. The specification chooses WebKit's behavior. Tests: web-platform-tests/wpt#16811
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.
New test LGTM with nit, although still unclear why one test uses navigation and the others use counters.
html/semantics/forms/form-submission-0/form-submission-algorithm.html
Outdated
Show resolved
Hide resolved
Specification change: whatwg/html#4621
Specification: whatwg/html#4621