diff --git a/index.bs b/index.bs index a94d67e5..4482a021 100644 --- a/index.bs +++ b/index.bs @@ -2674,7 +2674,8 @@ The browser.createUserContext command creates a ) browser.CreateUserContextParameters = { - ? acceptInsecureCerts: bool + ? acceptInsecureCerts: bool, + ? unhandledPromptBehavior: session.UserPromptHandler } @@ -2708,6 +2709,10 @@ The [=remote end steps=] with |session| and |command parameters| are: [=user context to accept insecure certificates override map=][|user context|] to |acceptInsecureCerts|. +1. If |command parameters| [=map/contains=] "unhandledPromptBehavior", + [=map/set=] [=user context to unhandled prompt behavior override map=][|user context|] to + |command parameters|["unhandledPromptBehavior"]. + 1. [=set/Append=] |user context| to the [=set of user contexts=]. 1. Let |user context info| be a [=/map=] matching the @@ -3061,6 +3066,10 @@ or null and an [=struct/item=] named viewport overrides map which is a weak map between [=user contexts=] and [=viewport configuration=]. +A [=remote end=] has an user context to unhandled prompt behavior override map +which is a weak map between [=user contexts=] and [=/map=] matching the +session.UserPromptHandlerType production. + ### Types ### {#module-browsingcontext-types} #### The browsingContext.BrowsingContext Type #### {#type-browsingContext-Browsingcontext} @@ -5577,6 +5586,26 @@ closed steps given |window|, |type|, |accepted| and optional |user text| +
+To get navigable's user prompt handler given |type| and |navigable|: + +1. Let |user context| be |navigable|'s [=associated user context=]. + +1. If [=user context to unhandled prompt behavior override map=] contains |user context|: + + 1. Let |behavior map| be [=user context to unhandled prompt behavior override map=][|user context|]. + + 1. If |behavior map| contains |type|, return |behavior map|[|type|]. + + 1. If |behavior map| contains "default", return + |behavior map|["default"]. + +1. Let |handler configuration| be [=get the prompt handler=] with |type|. + +1. Return |handler configuration|'s [=prompt handler configuration/handler=]. + +
+
The [=remote end event trigger=] is the WebDriver BiDi user prompt opened steps given |window|, |type|, |message|, and optional |default value| @@ -5586,10 +5615,8 @@ opened steps given |window|, |type|, |message|, and optional |default valu 1. Let |navigable id| be the [=navigable id=] for |navigable|. -1. Let |handler configuration| be [=get the prompt handler=] with |type|. - -1. Let |handler| be |handler configuration|'s [=prompt handler - configuration/handler=]. +1. Let |handler| be [=get navigable's user prompt handler=] with |type| and + |navigable|. 1. Let |params| be a [=/map=] matching the browsingContext.UserPromptOpenedParameters production with the