diff --git a/storage.bs b/storage.bs index 562ce28..42d1d4c 100644 --- a/storage.bs +++ b/storage.bs @@ -185,13 +185,30 @@ anticipated that some APIs will be applicable to both storage types going -
A storage key is an origin. [[HTML]]
This is expected to change, see Client-Side Storage Partitioning. +
To obtain a storage key, given an environment settings object +environment, run these steps: + +
Let key be environment's + origin. + +
If key is an opaque origin, then return failure. + +
If the user has disabled storage, then return failure. + +
Return key. +
A storage shed is a map of storage keys to storage shelves.
It is initially empty.
@@ -211,6 +228,28 @@ It is initially empty.
browsing session. It is roughly analogous to top-level browsing context except that it cannot
be replaced due to Cross-Origin-Opener-Policy
or navigation.
+
To legacy-clone a browsing session storage shed, given a browsing session +A and a browsing session B, run these steps: + +
For each key → shelf of A's + storage shed: + +
Let newShelf be the result of running create a storage shelf with
+ "session
".
+
+
Set newShelf's bucket map["default
"]'s
+ bottle map["sessionStorage
"]'s map to a
+ clone of shelf's bucket map["default
"]'s
+ bottle map["sessionStorage
"]'s map.
+
+
Set B's storage shed[key] to + newShelf. +
Let key be environment's - origin. +
Let key be the result of running obtain a storage key with + environment. -
If key is an opaque origin, then return failure. +
If key is failure, then return failure. -
If the user has disabled storage, then return failure. - -
If shed[key] does not exist, then: - -
Let shelf be a new storage shelf. - -
Set shelf's bucket map["default
"] to the result of
- create a storage bucket with type.
-
-
Set shed[key] to shelf. -
If shed[key] does not exist, then set + shed[key] to the result of running create a storage shelf with + type.
Return shed[key].
local
".
+To create a storage shelf, given a storage type type, run these +steps: + +
Let shelf be a new storage shelf. + +
Set shelf's bucket map["default
"] to the result of running
+ create a storage bucket with type.
+
+
Return shelf. +