diff --git a/index.html b/index.html index 3187af5b..152b43cf 100644 --- a/index.html +++ b/index.html @@ -2304,8 +2304,7 @@

Global State

  • Let serialized user prompt handler be serialize the user prompt handler. -

  • If serialized user prompt handler is not null, set - a property on capabilities with the name +

  • Set a property on capabilities with the name "unhandledPromptBehavior", and the value serialized user prompt handler. @@ -10481,8 +10480,11 @@

    User Prompt Handler

    This is to avoid [[WebDriver-BiDi]] monkey-patching the current spec. +

  • Let is string value be false. +

  • If value is a string set value to - the map «["default" → value]». + the map «["fallbackDefault" + → value]» and set is string value to true.

  • If value is not a map return error with error code invalid argument. @@ -10492,9 +10494,9 @@

    User Prompt Handler

  • For each prompt typehandler in value:

      -
    1. If valid prompt types does - not [=map/contain=] prompt type return error - with error code invalid argument. +

    2. If is string value is false and valid prompt + types does not [=map/contain=] prompt type + return error with error code invalid argument.

    3. If known prompt handlers does not contain an entry with handler key handler return error @@ -10545,11 +10547,7 @@

      User Prompt Handler

    4. If the requested prompt handler's [=prompt handler configuration/handler=] is not equal to the user prompt handler's [=prompt handler - configuration/handler=], or the requested prompt - handler's [=prompt handler configuration/notify=] - is not equal to the user prompt - handler's [=prompt handler configuration/handler=], - return false. + configuration/handler=], return false.

  • @@ -10558,6 +10556,12 @@

    User Prompt Handler

  • Return true
  • +

    This does not check the requested prompt +handler's [=prompt handler configuration/notify=] matches +the [=prompt handler configuration/handler=], because the [=prompt +handler configuration/notify=] component only affects the [=HTTP +session=], if any. +

    To update the user prompt handler given requested prompt handler:

      @@ -10578,13 +10582,14 @@

      User Prompt Handler

      To serialize the user prompt handler:

        -
      1. If the user prompt handler is null, return null. +

      2. If the user prompt handler is null, return + "dismiss and notify".

      3. If the user prompt handler has [=map/size=] 1, and user prompt handler [=list/contains=] - "default", return the result of serialize a prompt + "fallbackDefault", return the result of serialize a prompt handler configuration with user prompt - handler["default"]. + handler["fallbackDefault"].

      4. Let serialized be an empty map. @@ -10621,12 +10626,15 @@

        User Prompt Handler

      5. If handlers contains type return handlers[type]. +

      6. If handlers contains "default" + return handlers["default"]. +

      7. If type is "beforeUnload", return a prompt handler configuration with [=prompt handler configuration/handler=] "accept" and [=prompt handler configuration/notify=] false. -

      8. If handlers contains "default" +

      9. If handlers contains "fallbackDefault" return handlers["default"].

      10. Return a prompt handler