Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arichiv committed May 3, 2024
1 parent 70603c5 commit cb6d39c
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 7 deletions.
61 changes: 61 additions & 0 deletions files/en-us/web/api/storageaccesshandle/broadcastchannel/index.md
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)
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ browser-compat: api.StorageAccessHandle.createObjectURL
## Syntax

```js-nolint
createObjectURL(object)
handle.createObjectURL(object)
```

### Parameters

- `object`
- : A {{domxref("File")}}, {{domxref("Blob")}}, or {{domxref("MediaSource")}} object to
create an object URL for.
- : See {{domxref("URL.createObjectURL_static", "createObjectURL()")}}.

### Return value

Expand All @@ -30,6 +29,7 @@ A string containing an unpartitioned object URL that can be used to reference th

- `SecurityError` {{domxref("DomException")}}
- : Thrown if access was not granted.
- See {{domxref("URL.createObjectURL_static", "createObjectURL()")}}

## Examples

Expand Down
3 changes: 2 additions & 1 deletion files/en-us/web/api/storageaccesshandle/estimate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ browser-compat: api.StorageAccessHandle.estimate
## Syntax

```js-nolint
estimate()
handle.estimate()
```

### Parameters
Expand All @@ -28,6 +28,7 @@ A {{jsxref("Promise")}} that fufills with an unpartitioned {{domxref("StorageEst

- `SecurityError` {{domxref("DomException")}}
- : Thrown if access was not granted.
- See {{domxref("StorageManager.estimate()")}}

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ browser-compat: api.StorageAccessHandle.getDirectory
## Syntax

```js-nolint
getDirectory()
handle.getDirectory()
```

### Parameters
Expand All @@ -28,6 +28,7 @@ A {{jsxref("Promise")}} that fufills with an unpartitioned {{domxref("FileSystem

- `SecurityError` {{domxref("DomException")}}
- : Thrown if access was not granted.
- See {{domxref("StorageManager.getDirectory()")}}

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ browser-compat: api.StorageAccessHandle.revokeObjectURL
## Syntax

```js-nolint
revokeObjectURL(objectURL)
handle.revokeObjectURL(objectURL)
```

### Parameters

- `objectURL`
- : A string representing an object URL that was previously created by calling {{domxref("StorageAccessHandle.createObjectURL()")}}.
- : See {{domxref("URL.revokeObjectURL_static", "revokeObjectURL()")}}.

### Return value

Expand All @@ -29,6 +29,7 @@ None ({{jsxref("undefined")}}).

- `SecurityError` {{domxref("DomException")}}
- : Thrown if access was not granted.
- See {{domxref("URL.revokeObjectURL_static", "revokeObjectURL()")}}

## Examples

Expand Down
69 changes: 69 additions & 0 deletions files/en-us/web/api/storageaccesshandle/sharedworker/index.md
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)

0 comments on commit cb6d39c

Please sign in to comment.