Skip to content

Commit

Permalink
FF136 Relnote: Cookie Store API (#38096)
Browse files Browse the repository at this point in the history
* FF136 Relnote: Cookie Store API

* typo

* typo

* Fix my brain fade

* Apply suggestions from code review

Co-authored-by: Brian Smith <brian@smith.berlin>

---------

Co-authored-by: Brian Smith <brian@smith.berlin>
  • Loading branch information
hamishwillee and bsmth authored Feb 11, 2025
1 parent 37a32cb commit 23cc7f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 45 deletions.
45 changes: 0 additions & 45 deletions files/en-us/mozilla/firefox/experimental_features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1046,51 +1046,6 @@ Its main use case is to install a stack trace on a custom error object that does

## APIs

### Cookie Store API

The [Cookie Store API](/en-US/docs/Web/API/Cookie_Store_API) is a modern, {{jsxref("Promise")}}-based method of managing cookies that does not block the event loop and does not rely on {{domxref("Document")}} (it can therefore be made available to [service workers](/en-US/docs/Web/API/Service_Worker_API)). A subset of the Cookie Store API has been implemented ([Firefox bug 1800882](https://bugzil.la/1800882)). This includes:

- The [`CookieStore`](/en-US/docs/Web/API/CookieStore) interface, but `partitioned` is not included in return values.
- The [`CookieChangeEvent`](/en-US/docs/Web/API/CookieChangeEvent) interface, excluding `partitioned` properties.
- The [`Window.cookieStore`](/en-US/docs/Web/API/Window/cookieStore) property.
- The [`ServiceWorkerGlobalScope.cookieStore`](/en-US/docs/Web/API/ServiceWorkerGlobalScope/cookieStore) property.

<table>
<thead>
<tr>
<th>Release channel</th>
<th>Version added</th>
<th>Enabled by default?</th>
</tr>
</thead>
<tbody>
<tr>
<th>Nightly</th>
<td>132</td>
<td>Yes</td>
</tr>
<tr>
<th>Developer Edition</th>
<td>132</td>
<td>No</td>
</tr>
<tr>
<th>Beta</th>
<td>132</td>
<td>No</td>
</tr>
<tr>
<th>Release</th>
<td>132</td>
<td>No</td>
</tr>
<tr>
<th>Preference name</th>
<td colspan="2"><code>dom.cookieStore.enabled</code></td>
</tr>
</tbody>
</table>

### CloseWatcher Interface

Built-in web components with "open" and "close" semantics, such as modal dialogs and popovers, can be closed using device-native mechanisms.
Expand Down
9 changes: 9 additions & 0 deletions files/en-us/mozilla/firefox/releases/136/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ This article provides information about the changes in Firefox 136 that affect d
### APIs

- The maximum size of [Data URLs](/en-US/docs/Web/URI/Schemes/data) has been increased from 32MB to 512MB, matching the limit for Chromium browsers ([Firefox bug 1911300](https://bugzil.la/1911300)).
- The [Cookie Store API](/en-US/docs/Web/API/Cookie_Store_API) is a modern, {{glossary("asynchronous")}} {{jsxref("Promise")}}-based method of managing cookies, which can be used in both the main thread and in [service workers](/en-US/docs/Web/API/Service_Worker_API).
A subset of the Cookie Store API has been implemented ([Firefox bug 1937477](https://bugzil.la/1937477)). This includes:

- The [`CookieStore`](/en-US/docs/Web/API/CookieStore) interface, for getting, setting, and deleting cookies.
- The [`Window.cookieStore`](/en-US/docs/Web/API/Window/cookieStore) and [`ServiceWorkerGlobalScope.cookieStore`](/en-US/docs/Web/API/ServiceWorkerGlobalScope/cookieStore) properties for getting `CookieStore` instances.
- The [`change` event](/en-US/docs/Web/API/CookieStore/change_event) (and its interface [`CookieChangeEvent`](/en-US/docs/Web/API/CookieChangeEvent)), which fires in main thread and service worker contexts when cookies are set or deleted.

Note that while any of the supported cookie properties can be [set](/en-US/docs/Web/API/CookieStore/get), the cookie objects returned by the [`get()`](/en-US/docs/Web/API/CookieStore/get) and [`getAll()`](/en-US/docs/Web/API/CookieStore/getAll) methods, and in the `change` event, omit all properties other than `name` and `value` (matching the information returned by the {{domxref("document.cookie")}}).
The following interfaces and properties are not implemented: [`ServiceWorkerRegistration.cookies`](/en-US/docs/Web/API/ServiceWorkerRegistration/cookies), [`CookieStoreManager`](/en-US/docs/Web/API/CookieStoreManager), and [`ExtendableCookieChangeEvent`](/en-US/docs/Web/API/ExtendableCookieChangeEvent).

#### DOM

Expand Down

0 comments on commit 23cc7f0

Please sign in to comment.