-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support automatic user prompt handing in WebDriver BiDi #10189
base: main
Are you sure you want to change the base?
Conversation
source
Outdated
@@ -90720,22 +90720,28 @@ location.href = '#foo';</code></pre> | |||
<p>then:</p> | |||
|
|||
<ol> | |||
<li><p>Set <var>unloadPromptShown</var> to true.</p></li> | |||
<li> | |||
<p>Let <var>userPromptHandler</var> be the result of |
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.
The formatting of this whole section is a bit off. Maybe you can fix that?
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.
This PR does not handle dismiss yet?
06090d4
to
bb7b60e
Compare
Well it does, on the assumption that none/accept/dismiss are the only available options. In that case "dismiss" is what happens when the return value is neither "none" nor "accept". I think for |
This reads the return value from the WebDriver BiDi user prompt opened algorithm and uses it to decide whether to show the prompt, or skip showing it but act as if it had been accepted or canceled. At present the prompt opened function can return three values: "none", which causes the prompt to be displayed, "accept", which acts as if the prompt was accepted, and "dismiss" which acts as if the prompt was rejected. The WebDriver side is responsible for ensuring that only valid responses are sent for each prompt type (e.g. for an alert there isn't a "dismiss" option).
@jgraham is that PR ready for a general review now? |
This reads the return value from the WebDriver BiDi user prompt opened algorithm and uses it to decide whether to show the prompt, or skip showing it but act as if it had been accepted or canceled.
At present the prompt opened function can return three values: "none", which causes the prompt to be displayed, "accept", which acts as if the prompt was accepted, and "dismiss" which acts as if the prompt was rejected. The WebDriver side is responsible for ensuring that only valid responses are sent for each prompt type (e.g. for an alert there isn't a "dismiss" option).
(See WHATWG Working Mode: Changes for more details.)
/browsing-the-web.html ( diff )
/timers-and-user-prompts.html ( diff )