-
Notifications
You must be signed in to change notification settings - Fork 22.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
140 additions
and
7 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
files/en-us/web/api/storageaccesshandle/broadcastchannel/index.md
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,61 @@ | ||
--- | ||
title: "StorageAccessHandle: BroadcastChannel() property" | ||
short-title: BroadcastChannel() | ||
slug: Web/API/StorageAccessHandle/BroadcastChannel | ||
page-type: web-api-instance-method | ||
browser-compat: api.StorageAccessHandle.BroadcastChannel | ||
--- | ||
|
||
{{APIRef("Storage Access API")}} | ||
|
||
> **Note:** See {{domxref("BroadcastChannel.BroadcastChannel", "BroadcastChannel()")}} to understand usage. | ||
## Syntax | ||
|
||
```js-nolint | ||
handle.BroadcastChannel(channelName) | ||
``` | ||
|
||
### Parameters | ||
|
||
- `channelName` | ||
- : See {{domxref("BroadcastChannel.BroadcastChannel", "BroadcastChannel()")}}. | ||
|
||
### Return value | ||
|
||
An unpartitioned {{domxref("BroadcastChannel")}} object. | ||
|
||
### Exceptions | ||
|
||
- `SecurityError` {{domxref("DomException")}} | ||
- : Thrown if access was not granted. | ||
- See {{domxref("BroadcastChannel.BroadcastChannel", "BroadcastChannel()")}} | ||
|
||
## Examples | ||
|
||
```js | ||
document.requestStorageAccess({ BroadcastChannel: true }).then( | ||
(handle) => { | ||
console.log("BroadcastChannel access granted"); | ||
handle.BroadcastChannel(channel_name); | ||
}, | ||
() => { | ||
console.log("BroadcastChannel access denied"); | ||
}, | ||
); | ||
``` | ||
|
||
> **Note:** See [Using the Storage Access API](/en-US/docs/Web/API/Storage_Access_API/Using) for a more complete example. | ||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("Document.requestStorageAccess()")}} | ||
- [Using the Storage Access API](/en-US/docs/Web/API/Storage_Access_API/Using) |
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
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
69 changes: 69 additions & 0 deletions
69
files/en-us/web/api/storageaccesshandle/sharedworker/index.md
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,69 @@ | ||
--- | ||
title: "StorageAccessHandle: SharedWorker() property" | ||
short-title: SharedWorker() | ||
slug: Web/API/StorageAccessHandle/SharedWorker | ||
page-type: web-api-instance-method | ||
browser-compat: api.StorageAccessHandle.SharedWorker | ||
--- | ||
|
||
{{APIRef("Storage Access API")}} | ||
|
||
> **Note:** See {{domxref("SharedWorker.SharedWorker", "SharedWorker()")}} to understand usage. | ||
## Syntax | ||
|
||
```js-nolint | ||
handle.SharedWorker(aURL) | ||
handle.SharedWorker(aURL, name) | ||
handle.SharedWorker(aURL, options) | ||
``` | ||
|
||
### Parameters | ||
|
||
- `aURL` | ||
- : See {{domxref("SharedWorker.SharedWorker", "SharedWorker()")}}. | ||
- `name` {{optional_inline}} | ||
- : See {{domxref("SharedWorker.SharedWorker", "SharedWorker()")}}. | ||
- `options` {{optional_inline}} | ||
- : See {{domxref("SharedWorker.SharedWorker", "SharedWorker()")}}. | ||
|
||
> **Note:** `options.sameSiteCookies` only supports the value "none", which is the default. | ||
### Return value | ||
|
||
An unpartitioned {{domxref("SharedWorker")}} object. | ||
|
||
### Exceptions | ||
|
||
- `SecurityError` {{domxref("DomException")}} | ||
- : Thrown if access was not granted. | ||
- See {{domxref("SharedWorker.SharedWorker", "SharedWorker()")}} | ||
|
||
## Examples | ||
|
||
```js | ||
document.requestStorageAccess({ SharedWorker: true }).then( | ||
(handle) => { | ||
console.log("SharedWorker access granted"); | ||
handle.SharedWorker(shared_worker_url); | ||
}, | ||
() => { | ||
console.log("SharedWorker access denied"); | ||
}, | ||
); | ||
``` | ||
|
||
> **Note:** See [Using the Storage Access API](/en-US/docs/Web/API/Storage_Access_API/Using) for a more complete example. | ||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("Document.requestStorageAccess()")}} | ||
- [Using the Storage Access API](/en-US/docs/Web/API/Storage_Access_API/Using) |