-
Notifications
You must be signed in to change notification settings - Fork 22.9k
Bug 1886894 Clear sessionStorage in browsingData remove options #41609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0e237d8
661bd99
b2dd27d
3580f84
a5e4e09
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,14 +6,12 @@ browser-compat: webextensions.api.browsingData.removeLocalStorage | |||||||||
| sidebar: addonsidebar | ||||||||||
| --- | ||||||||||
|
|
||||||||||
| Clears any [local storage](/en-US/docs/Web/API/Window/localStorage) created by websites. | ||||||||||
| Clears any [local storage](/en-US/docs/Web/API/Window/localStorage) and [session storage](/en-US/docs/Web/API/Window/sessionStorage) created by websites and extensions. | ||||||||||
|
|
||||||||||
| You can use the `removalOptions` parameter, which is a {{WebExtAPIRef("browsingData.RemovalOptions")}} object, to: | ||||||||||
|
|
||||||||||
| - clear only local storage objects created after a given time | ||||||||||
| - control whether to clear only local storage objects created by normal web pages or to clear objects created by hosted apps and extensions as well. | ||||||||||
|
|
||||||||||
| This is an asynchronous function that returns a [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). | ||||||||||
| - clear local and session storage objects created after a given time. | ||||||||||
| - control whether to clear localStorage and sessionStorage objects created by web pages or web pages extensions. | ||||||||||
|
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "objects" -> "values". The localStorage/sessionStorage APIs only store strings, so it's a bit strange to refer to it as objects. This was already a pre-existing issue, but since we're editing this anyway...
Suggested change
|
||||||||||
|
|
||||||||||
| ## Syntax | ||||||||||
|
|
||||||||||
|
|
@@ -26,11 +24,11 @@ let removing = browser.browsingData.removeLocalStorage( | |||||||||
| ### Parameters | ||||||||||
|
|
||||||||||
| - `removalOptions` | ||||||||||
| - : `object`. A {{WebExtAPIRef("browsingData.RemovalOptions")}} object, which may be used to clear only local storage objects created by normal web pages or to clear objects created by hosted apps and extensions as well. | ||||||||||
| - : `object`. A {{WebExtAPIRef("browsingData.RemovalOptions")}} object, which can be used to clear local and session storage objects stored after a given time, and control whether to clear local and session storage objects created by web pages or web pages and extensions. | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggested edit for consistency with earlier methods. But note: Firefox does NOT support "since" with removeLocalStorage (or the
Suggested change
|
||||||||||
|
|
||||||||||
| ### Return value | ||||||||||
|
|
||||||||||
| A [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that will be fulfilled with no arguments when the removal has finished. If any error occurs, the promise will be rejected with an error message. | ||||||||||
| A [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that is fulfilled with no arguments when the removal has finished. If any error occurs, the promise is rejected with an error message. | ||||||||||
|
|
||||||||||
| ## Examples | ||||||||||
|
|
||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"web pages or web pages and extensions" reads a bit ambiguous. How about this: