Skip to content

Commit

Permalink
Update user prompt handler note for fallbackDefault (#1831)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: jgraham <[email protected]>
  • Loading branch information
juliandescottes and jgraham authored Jul 23, 2024
1 parent 57eb5e9 commit 7a23ea0
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10474,13 +10474,18 @@ <h3>User Prompt Handler</h3>
"<code>default</code>", "<code>prompt</code>"».

<p class="note">The "<code>default</code>" type represents a fallback
when no specific handler is defined for a given prompt type. The
"<code>beforeUnload</code>" prompt type does not use this default
handler, but instead falls back to the "<code>accept</code>" handler
if no more specific handler is defined. This is because HTTP-only
sessions do not allow the "<code>beforeUnload</code>" handler to be
customized, and enabling other protocols isn&apos;t expected to change
the user prompt handling as a side effect.
when no specific handler is defined for a given prompt type, including
the "<code>beforeUnload</code>" prompt type. It can only be set if the
unhandled prompt behavior is a <a data-cite=infra>map</a> which
[=map/contains=] "<code>default</code>". For HTTP-only sessions setting
unhandled prompt behavior as a string value, the value will be assigned to
the internal type "<code>fallbackDefault</code>". The
"<code>fallbackDefault</code>" value is not used for the
"<code>beforeUnload</code>" prompt type, instead it falls back to the
"<code>accept</code>" handler. This is because HTTP-only sessions do not
allow the "<code>beforeUnload</code>" handler to be customized, and enabling
other protocols isn&apos;t expected to change the user prompt handling as a
side effect.

<p>To <dfn>deserialize as an unhandled prompt behavior</dfn> given
argument <var>value</var>:
Expand Down Expand Up @@ -10655,7 +10660,7 @@ <h3>User Prompt Handler</h3>
and [=prompt handler configuration/notify=] false.

<li><p>If <var>handlers</var> contains "<code>fallbackDefault</code>"
return <var>handlers</var>["<code>default</code>"].
return <var>handlers</var>["<code>fallbackDefault</code>"].

<li><p>Return a <a>prompt handler
configuration</a> with [=prompt handler
Expand Down

0 comments on commit 7a23ea0

Please sign in to comment.