Skip to content

Commit 7a23ea0

Browse files
Update user prompt handler note for fallbackDefault (#1831)
--------- Co-authored-by: jgraham <james@hoppipolla.co.uk>
1 parent 57eb5e9 commit 7a23ea0

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

index.html

+13-8
Original file line numberDiff line numberDiff line change
@@ -10474,13 +10474,18 @@ <h3>User Prompt Handler</h3>
1047410474
"<code>default</code>", "<code>prompt</code>"».
1047510475

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

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

1065710662
<li><p>If <var>handlers</var> contains "<code>fallbackDefault</code>"
10658-
return <var>handlers</var>["<code>default</code>"].
10663+
return <var>handlers</var>["<code>fallbackDefault</code>"].
1065910664

1066010665
<li><p>Return a <a>prompt handler
1066110666
configuration</a> with [=prompt handler

0 commit comments

Comments
 (0)