-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init StorageEvent documentation (#29760)
* init StorageEvent.StorageEvent * add additional link * init StorageEvent.url * init StorageEvent.storageArea * init StorageEvent.key * init StorageEvent.oldValue * init StorageEvent.newValue * fix action error * style pretty * style * Apply suggestions from code review Co-authored-by: wbamberg <[email protected]> * fix * update * update * update link * fix macros * update * text update * text update --------- Co-authored-by: wbamberg <[email protected]>
- Loading branch information
1 parent
ca577ad
commit cec2a00
Showing
9 changed files
with
216 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: "StorageEvent: key property" | ||
short-title: key | ||
slug: Web/API/StorageEvent/key | ||
page-type: web-api-instance-property | ||
browser-compat: api.StorageEvent.key | ||
--- | ||
|
||
{{APIRef("Web Storage API")}} | ||
|
||
The **`key`** property of the {{domxref("StorageEvent")}} interface returns the key for the storage item that was changed. | ||
|
||
## Value | ||
|
||
A string containing the key for the storage item that was changed. | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("Web Storage API", "", "", "nocode")}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: "StorageEvent: newValue property" | ||
short-title: newValue | ||
slug: Web/API/StorageEvent/newValue | ||
page-type: web-api-instance-property | ||
browser-compat: api.StorageEvent.newValue | ||
--- | ||
|
||
{{APIRef("Web Storage API")}} | ||
|
||
The **`newValue`** property of the {{domxref("StorageEvent")}} interface returns the new value of the storage item whose value was changed. | ||
|
||
## Value | ||
|
||
A string containing the new value of the storage item. | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("Web Storage API", "", "", "nocode")}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: "StorageEvent: oldValue property" | ||
short-title: oldValue | ||
slug: Web/API/StorageEvent/oldValue | ||
page-type: web-api-instance-property | ||
browser-compat: api.StorageEvent.oldValue | ||
--- | ||
|
||
{{APIRef("Web Storage API")}} | ||
|
||
The **`oldValue`** property of the {{domxref("StorageEvent")}} interface returns the original value of the storage item whose value changed. | ||
|
||
## Value | ||
|
||
A string containing the original value of the storage item. | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("Web Storage API", "", "", "nocode")}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: "StorageEvent: storageArea property" | ||
short-title: storageArea | ||
slug: Web/API/StorageEvent/storageArea | ||
page-type: web-api-instance-property | ||
browser-compat: api.StorageEvent.storageArea | ||
--- | ||
|
||
{{APIRef("Web Storage API")}} | ||
|
||
The **`storageArea`** property of the {{domxref("StorageEvent")}} interface returns the storage object that was affected. | ||
|
||
## Value | ||
|
||
A {{DOMxRef("Storage")}} object that represents the storage object that was affected. | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("Web Storage API", "", "", "nocode")}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: "StorageEvent: StorageEvent() constructor" | ||
short-title: StorageEvent() | ||
slug: Web/API/StorageEvent/StorageEvent | ||
page-type: web-api-constructor | ||
browser-compat: api.StorageEvent.StorageEvent | ||
--- | ||
|
||
{{ApiRef("Web Storage API")}} | ||
|
||
The **`StorageEvent()`** constructor creates a new {{domxref("StorageEvent")}} object. | ||
|
||
## Syntax | ||
|
||
```js-nolint | ||
new StorageEvent(type) | ||
new StorageEvent(type, options) | ||
``` | ||
|
||
### Parameters | ||
|
||
- `type` | ||
- : A string with the name of the type of the `StorageEvent`. It is case-sensitive and browsers set it to `storage`. | ||
- `options` {{optional_inline}} | ||
- : An object that, _in addition of the properties defined in {{domxref("Event/Event", "Event()")}}_, has the following properties: | ||
- `key` {{optional_inline}} | ||
- : A string that represents the key for the storage item that changed. Defaults to `null`. | ||
- `oldValue` {{optional_inline}} | ||
- : A string containing the original value of the storage item. Defaults to `null`. | ||
- `newValue` {{optional_inline}} | ||
- : A string with the new value of the `key`. Defaults to `null`. | ||
- `url` | ||
- : A string with the URL of the document whose storage changed. | ||
- `storageArea` {{optional_inline}} | ||
- : A {{DOMxRef("Storage")}} object that represents the storage that was affected. Defaults to `null`. | ||
|
||
### Return value | ||
|
||
A new {{domxref("StorageEvent")}} object. | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("Web Storage API", "", "", "nocode")}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: "StorageEvent: url property" | ||
short-title: url | ||
slug: Web/API/StorageEvent/url | ||
page-type: web-api-instance-property | ||
browser-compat: api.StorageEvent.url | ||
--- | ||
|
||
{{APIRef("Web Storage API")}} | ||
|
||
The **`url`** property of the {{domxref("StorageEvent")}} interface returns the URL of the document whose storage changed. | ||
|
||
## Value | ||
|
||
A string containing the URL of the document whose storage changed. | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("Web Storage API", "", "", "nocode")}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters