Skip to content

Commit 865deea

Browse files
Split download behavior to a struct
1 parent dd7a8cb commit 865deea

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

index.bs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3029,8 +3029,12 @@ A <dfn>download behavior struct</dfn> is a [=struct=] with:
30293029
* [=struct/item=] named <dfn id="download-behavior-struct-allowed" for="download-behavior-struct">allowed</dfn> which is a boolean;
30303030
* [=struct/item=] named <dfn id="download-behavior-struct-destination-folder" for="download-behavior-struct">destinationFolder</dfn> which is a string or null.
30313031

3032-
A [=remote end=] has a <dfn>download behavior map</dfn> which is a weak map between
3033-
[=user contexts=] or "<code>global</code>" and [=download behavior struct=] or null.
3032+
A [=remote end=] has a <dfn>download behavior</dfn> which is a [=struct=] with an [=struct/item=]
3033+
named <dfn for="download behavior">default download behavior</dfn>, which is a
3034+
[=download behavior struct=] or null, and an [=struct/item=] named <dfn
3035+
for="download behavior">user context download behavior</dfn>, which is a weak map between
3036+
[=user contexts=] and [=download behavior struct=].
3037+
30343038

30353039
The <dfn export for=commands>browser.setDownloadBehavior</dfn> command returns a
30363040
list of [=client window=]s.
@@ -3079,13 +3083,11 @@ To <dfn export>get download behavior</dfn> given |navigable|:
30793083

30803084
1. Let |user context| be |navigable|'s [=associated user context=].
30813085

3082-
1. If [=download behavior map=] [=map/contains=] |user context|, return
3083-
[=download behavior map=][|user context|].
3084-
3085-
1. If [=download behavior map=] [=map/contains=] "<code>global</code>", return
3086-
[=download behavior map=]["<code>global</code>"].
3086+
1. If [=download behavior=]'s [=download behavior/user context download behavior=] [=map/contains=]
3087+
|user context|, return [=download behavior=]'s
3088+
[=download behavior/user context download behavior=][|user context|].
30873089

3088-
1. Return null.
3090+
1. Return [=download behavior=]'s [=download behavior/default download behavior=].
30893091

30903092
</div>
30913093

0 commit comments

Comments
 (0)