You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"generatedSubtitle": "W3C Editor's Draft 23 July 2024"
278
278
}</script>
279
279
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED"></head><body data-cite="WEBIDL CSSOM-VIEW GEOMETRY-1 fileapi HTML INFRA URL WEBIDL DOM FETCH" class="h-entry"><div class="head">
</p><div class="note" role="note" id="issue-container-generatedID-57"><div role="heading" class="note-title marker" id="h-note-57" aria-level="3"><span>Note</span></div><p class="">The "<code>default</code>" type represents a fallback
11237
-
when no specific handler is defined for a given prompt type. The
11238
-
"<code>beforeUnload</code>" prompt type does not use this default
11239
-
handler, but instead falls back to the "<code>accept</code>" handler
11240
-
if no more specific handler is defined. This is because HTTP-only
11241
-
sessions do not allow the "<code>beforeUnload</code>" handler to be
11242
-
customized, and enabling other protocols isn't expected to change
11243
-
the user prompt handling as a side effect.
11237
+
when no specific handler is defined for a given prompt type, including
11238
+
the "<code>beforeUnload</code>" prompt type. It can only be set if the
11239
+
unhandled prompt behavior is a <a data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-map-5">map</a> which
11240
+
<a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-index-term-contains-for-map-5">contains</a> "<code>default</code>". For HTTP-only sessions setting
11241
+
unhandled prompt behavior as a string value, the value will be assigned to
11242
+
the internal type "<code>fallbackDefault</code>". The
11243
+
"<code>fallbackDefault</code>" value is not used for the
11244
+
"<code>beforeUnload</code>" prompt type, instead it falls back to the
11245
+
"<code>accept</code>" handler. This is because HTTP-only sessions do not
11246
+
allow the "<code>beforeUnload</code>" handler to be customized, and enabling
11247
+
other protocols isn't expected to change the user prompt handling as a
11248
+
side effect.
11244
11249
11245
11250
</p></div><p>To <dfn id="dfn-deserialize-as-an-unhandled-prompt-behavior" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">deserialize as an unhandled prompt behavior</dfn> given
</p></div></li><li><p>Let <var>is string value</var> be false.
11263
11268
11264
11269
</p></li><li><p>If <var>value</var> is a <a href="#dfn-string" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-string-14">string</a> set <var>value</var> to
11265
-
the <a data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-map-5">map</a> «["<code>fallbackDefault</code>"
11270
+
the <a data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-map-6">map</a> «["<code>fallbackDefault</code>"
11266
11271
→ <var>value</var>]» and set <var>is string value</var> to true.
11267
11272
11268
-
</p></li><li><p>If <var>value</var> is not a <a data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-map-6">map</a> return
11273
+
</p></li><li><p>If <var>value</var> is not a <a data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-map-7">map</a> return
</p></li><li>Let <var>user prompt handler</var> be an empty <a data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-map-7">map</a>.
11276
+
</p></li><li>Let <var>user prompt handler</var> be an empty <a data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-map-8">map</a>.
11272
11277
11273
11278
</li><li><p>For each <var>prompt type</var> → <var>handler</var> in <var>value</var>:
11274
11279
11275
11280
</p><ol>
11276
11281
<li><p>If <var>is string value</var> is false and <a href="#dfn-valid-prompt-types" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-valid-prompt-types-1">valid prompt
11277
-
types</a> does not <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-index-term-contains-for-map-5">contain</a> <var>prompt type</var>
11282
+
types</a> does not <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-index-term-contains-for-map-6">contain</a> <var>prompt type</var>
</p></li><li><p>If <a href="#dfn-known-prompt-handlers" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-known-prompt-handlers-1">known prompt handlers</a> does not contain an entry
handler configuration</a> with <a href="#dfn-user-prompt-handler" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-user-prompt-handler-14">user prompt
11365
11370
handler</a>["<code>fallbackDefault</code>"].
11366
11371
11367
-
</p></li><li><p>Let <var>serialized</var> be an empty <a data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-map-8">map</a>.
11372
+
</p></li><li><p>Let <var>serialized</var> be an empty <a data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-map-9">map</a>.
11368
11373
11369
11374
</p></li><li><p>For each <var>key</var> → <code>value</code> of <a href="#dfn-user-prompt-handler" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-user-prompt-handler-15">user prompt
<a href="#ref-for-index-term-contains-for-map-5" title="§ 16.1 User Prompt Handler">§ 16.1 User Prompt Handler</a> <a href="#ref-for-index-term-contains-for-map-6" title="Reference 2">(2)</a>
25545
+
<a href="#ref-for-index-term-contains-for-map-5" title="§ 16.1 User Prompt Handler">§ 16.1 User Prompt Handler</a> <a href="#ref-for-index-term-contains-for-map-6" title="Reference 2">(2)</a> <a href="#ref-for-index-term-contains-for-map-7" title="Reference 3">(3)</a>
25541
25546
</li>
25542
25547
</ul>
25543
25548
</div><div class="dfn-panel" hidden="" role="dialog" aria-modal="true" id="dfn-panel-for-index-term-continue-for-iteration" aria-label="Links in this document to definition: continue (for iteration)">
</div><div class="dfn-panel" hidden="" role="dialog" aria-modal="true" id="dfn-panel-for-index-term-queue" aria-label="Links in this document to definition: queue">
0 commit comments