Skip to content

Commit

Permalink
Update transferable objects list (#36390)
Browse files Browse the repository at this point in the history
* update transferable objects list

* Update index.md - list not exhaustive

* add transferable info

* Update index.md

* Update files/en-us/web/api/web_workers_api/transferable_objects/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update files/en-us/web/api/web_workers_api/transferable_objects/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: Hamish Willee <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 20, 2024
1 parent e626cc8 commit 47c461a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions files/en-us/web/api/mediasourcehandle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ It can be accessed via the {{domxref("MediaSource.handle")}} property.

Each `MediaSource` object created inside a dedicated worker has its own distinct `MediaSourceHandle`. The `MediaSource.handle` getter will always return the `MediaSourceHandle` instance specific to the associated dedicated worker `MediaSource` instance. If the handle has already been transferred to the main thread using {{domxref("DedicatedWorkerGlobalScope.postMessage()", "postMessage()")}}, the handle instance in the worker is technically detached and can't be transferred again.

`MediaSourceHandle` is a [transferable object](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects).

## Instance properties

None.
Expand Down
2 changes: 2 additions & 0 deletions files/en-us/web/api/midiaccess/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ browser-compat: api.MIDIAccess

The **`MIDIAccess`** interface of the [Web MIDI API](/en-US/docs/Web/API/Web_MIDI_API) provides methods for listing MIDI input and output devices, and obtaining access to those devices.

`MIDIAccess` is a [transferable object](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects).

{{InheritanceDiagram}}

## Instance properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ console.log(original.byteLength); // 0

## Supported objects

The items that various specifications indicate can be _transferred_ are:
Interfaces that can be transferred should include this information in their introduction.

Some of the items that various specifications indicate can be _transferred_ are listed below (this list may not be exhaustive!):

- {{jsxref("ArrayBuffer")}}
- {{domxref("MessagePort")}}
Expand All @@ -87,12 +89,12 @@ The items that various specifications indicate can be _transferred_ are:
- {{domxref("VideoFrame")}}
- {{domxref("OffscreenCanvas")}}
- {{domxref("RTCDataChannel")}}

Browser support should be indicated in the respective object's compatibility information by the `transferable` subfeature (see [`RTCDataChannel`](/en-US/docs/Web/API/RTCDataChannel#browser_compatibility) for an example).
At time of writing, not all transferable objects have been updated with this information.
- {{domxref("MediaSourceHandle")}}
- {{domxref("MIDIAccess")}}

> [!NOTE]
> Transferable objects are marked up in [Web IDL files](https://github.com/w3c/webref/tree/main/ed/idl) with the attribute `[Transferable]`.
> Browser support may be indicated in the respective object's compatibility information by the `transferable` subfeature (see [`RTCDataChannel`](/en-US/docs/Web/API/RTCDataChannel#browser_compatibility) for an example).
## See also

Expand Down

0 comments on commit 47c461a

Please sign in to comment.