Skip to content

Commit

Permalink
Add Storage APIs (#1773)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel D. Beck <[email protected]>
Co-authored-by: Patrick Brosset <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2024
1 parent 159f0f4 commit a6f6b25
Show file tree
Hide file tree
Showing 15 changed files with 198 additions and 46 deletions.
7 changes: 0 additions & 7 deletions features/draft/spec/requeststorageaccessfor.yml

This file was deleted.

20 changes: 0 additions & 20 deletions features/draft/spec/requeststorageaccessfor.yml.dist

This file was deleted.

11 changes: 0 additions & 11 deletions features/draft/spec/storage.yml

This file was deleted.

25 changes: 25 additions & 0 deletions features/localstorage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: localStorage and sessionStorage
description: The `localStorage` and `sessionStorage` APIs store data as key-value pairs. While `localStorage` persists across sessions, `sessionStorage` data is discarded when the page is closed.
spec: https://storage.spec.whatwg.org/
group: storage
caniuse: namevalue-storage
# Computing from here aligns the feature with Caniuse
status:
compute_from: api.Storage
compat_features:
- api.Storage
- api.Storage.clear
- api.Storage.getItem
- api.Storage.key
- api.Storage.length
- api.Storage.removeItem
- api.Storage.setItem
- api.StorageEvent
- api.StorageEvent.key
- api.StorageEvent.newValue
- api.StorageEvent.oldValue
- api.StorageEvent.storageArea
- api.StorageEvent.url
- api.Window.localStorage
- api.Window.sessionStorage
- api.Window.storage_event
116 changes: 116 additions & 0 deletions features/localstorage.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Generated from: localstorage.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: 2015-07-29
baseline_high_date: 2018-01-29
support:
chrome: "4"
chrome_android: "18"
edge: "12"
firefox: "3.5"
firefox_android: "6"
safari: "4"
safari_ios: "3.2"
compat_features:
# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "1"
# chrome_android: "18"
# edge: "12"
# firefox: "13"
# firefox_android: "14"
# safari: "4"
# safari_ios: "3"
- api.StorageEvent
- api.StorageEvent.key
- api.StorageEvent.newValue
- api.StorageEvent.oldValue

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "3"
# chrome_android: "18"
# edge: "12"
# firefox: "13"
# firefox_android: "14"
# safari: "4"
# safari_ios: "3"
- api.StorageEvent.storageArea

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "4"
# chrome_android: "18"
# edge: "12"
# firefox: "2"
# firefox_android: "4"
# safari: "4"
# safari_ios: "3.2"
- api.Window.sessionStorage

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "4"
# chrome_android: "18"
# edge: "12"
# firefox: "3.5"
# firefox_android: "4"
# safari: "4"
# safari_ios: "3.2"
- api.Window.localStorage

# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "4"
# chrome_android: "18"
# edge: "12"
# firefox: "3.5"
# firefox_android: "6"
# safari: "4"
# safari_ios: "3.2"
- api.Storage
- api.Storage.clear
- api.Storage.getItem
- api.Storage.key
- api.Storage.length
- api.Storage.removeItem
- api.Storage.setItem

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "6"
# chrome_android: "18"
# edge: "12"
# firefox: "13"
# firefox_android: "14"
# safari: "5"
# safari_ios: "5"
- api.StorageEvent.url

# baseline: high
# baseline_low_date: 2017-04-05
# baseline_high_date: 2019-10-05
# support:
# chrome: "1"
# chrome_android: "18"
# edge: "15"
# firefox: "45"
# firefox_android: "45"
# safari: "4"
# safari_ios: "4"
- api.Window.storage_event
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
draft_date: 2024-09-09
name: Extending Storage Access API (SAA) to non-cookie storage
description: TODO
name: Non-cookie storage access
description: "Non-cookie storage access extends the `requestStorageAccess()` API to let content in cross-site iframes request access to first-party data beyond cookies."
spec: https://privacycg.github.io/saa-non-cookie-storage/
group: storage
compat_features:
- api.Document.hasUnpartitionedCookieAccess
- api.Document.requestStorageAccess.types_parameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated from: saa-non-cookie-storage.yml
# Generated from: non-cookie-storage-access.yml
# Do not edit this file by hand. Edit the source file instead!

status:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
draft_date: 2024-09-09
name: Shared Storage API
description: TODO
name: Shared storage
description: The `sharedStorage` API stores data to a shared space where the data can then be processed without the ability to track users across the different sites they visit. A common use case is measuring the reach of third-party ads without using user-tracking cookies."
spec: https://wicg.github.io/shared-storage/
group: storage
compat_features:
- api.HTMLIFrameElement.sharedStorageWritable
- api.HTMLImageElement.sharedStorageWritable
Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions features/storage-access.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
name: Storage access
description: The `document.requestStorageAccess()` method allows content in iframes to request storing and reading cookies and other site data, while the `document.hasStorageAccess()` method checks if such access is granted.
spec: https://privacycg.github.io/storage-access/
group: storage
status:
compute_from: api.Document.requestStorageAccess
compat_features:
- api.Document.hasStorageAccess
- api.Document.requestStorageAccess
- api.Document.requestStorageAccessFor
- api.Permissions.permission_top-level-storage-access
23 changes: 23 additions & 0 deletions features/storage-access.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,28 @@ status:
safari: "11.1"
safari_ios: "11.3"
compat_features:
# ⬇️ Same status as overall feature ⬇️
# baseline: low
# baseline_low_date: 2023-12-05
# support:
# chrome: "119"
# chrome_android: "120"
# edge: "85"
# firefox: "65"
# firefox_android: "65"
# safari: "11.1"
# safari_ios: "11.3"
- api.Document.hasStorageAccess
- api.Document.requestStorageAccess

# baseline: false
# support:
# chrome: "119"
# chrome_android: "119"
# edge: "119"
- api.Document.requestStorageAccessFor

# baseline: false
# support:
# chrome_android: "120"
- api.Permissions.permission_top-level-storage-access
1 change: 1 addition & 0 deletions features/storage-buckets.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: Storage buckets
description: The `navigator.storageBuckets` API allows you to organize locally stored data into groups called storage buckets. Each bucket can have different settings, allowing the browser to manage and delete buckets independently rather than applying the same treatment to all.
spec: https://wicg.github.io/storage-buckets/
group: storage
11 changes: 11 additions & 0 deletions features/storage-manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Storage manager
description: "The `navigator.storage` API provides information about the availability and persistence of the data that a site stores on the device, by using APIs such as the Cache API or the IndexedDB API."
spec: https://storage.spec.whatwg.org/
group: storage
compat_features:
- api.Navigator.storage
- api.WorkerNavigator.storage
- api.StorageManager
- api.StorageManager.estimate
- api.StorageManager.persist
- api.StorageManager.persisted
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated from: storage.yml
# Generated from: storage-manager.yml
# Do not edit this file by hand. Edit the source file instead!

status:
Expand Down
6 changes: 6 additions & 0 deletions groups/storage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Group for the set of features related to storage of data.
# Currently this group contains all storage related features
# that have been developed. However, there are still many to add,
# so it's possible this eventually gets sub-groups or another
# approach for more specific categorization.
name: Storage

0 comments on commit a6f6b25

Please sign in to comment.