From afbf6bd7bf34992e8a1dac5db2313a359245df9d Mon Sep 17 00:00:00 2001 From: Ben Kelly Date: Fri, 4 Mar 2022 02:27:49 -0600 Subject: [PATCH] Support obtaining a storage key from an environment Fixes #137. Co-authored-by: Anne van Kesteren --- storage.bs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/storage.bs b/storage.bs index 8fa9536..18f7985 100644 --- a/storage.bs +++ b/storage.bs @@ -204,7 +204,7 @@ anticipated that some APIs will be applicable to both storage types going

This is expected to change; see Client-Side Storage Partitioning. -

To obtain a storage key, given an environment settings object +

To obtain a storage key, given an environment environment, run these steps:

    @@ -219,14 +219,16 @@ anticipated that some APIs will be applicable to both storage types going
  1. Return key.

-

To obtain a storage key for non-storage purposes, given an environment -settings object environment, run these steps: +

To obtain a storage key for non-storage purposes, given an +environment environment, run these steps:

    -
  1. Let key be a tuple consisting of environment's - origin. +

  2. Let origin be environment's + origin if environment is an + environment settings object; otherwise environment's + creation URL's origin. -

  3. Return key. +

  4. Return a tuple consisting of origin.

To determine whether a storage key A