Skip to content

Commit 00da003

Browse files
aduh95targos
authored andcommitted
doc: make MDN links to global classes more consistent
PR-URL: #56923 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ulises Gascón <[email protected]>
1 parent d901987 commit 00da003

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

doc/api/worker_threads.md

+7-12
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ inherits from its global `Object` class. Objects passed to the
287287
and inherit from its global `Object` class.
288288

289289
However, the created `MessagePort` no longer inherits from
290-
[`EventTarget`][], and only [`port.onmessage()`][] can be used to receive
290+
{EventTarget}, and only [`port.onmessage()`][] can be used to receive
291291
events using it.
292292

293293
## `worker.parentPort`
@@ -847,14 +847,14 @@ circularData.foo = circularData;
847847
port2.postMessage(circularData);
848848
```
849849
850-
`transferList` may be a list of [`ArrayBuffer`][], [`MessagePort`][], and
850+
`transferList` may be a list of {ArrayBuffer}, [`MessagePort`][], and
851851
[`FileHandle`][] objects.
852852
After transferring, they are not usable on the sending side of the channel
853853
anymore (even if they are not contained in `value`). Unlike with
854854
[child processes][], transferring handles such as network sockets is currently
855855
not supported.
856856
857-
If `value` contains [`SharedArrayBuffer`][] instances, those are accessible
857+
If `value` contains {SharedArrayBuffer} instances, those are accessible
858858
from either thread. They cannot be listed in `transferList`.
859859
860860
`value` may still contain `ArrayBuffer` instances that are not in
@@ -892,8 +892,8 @@ behind this API, see the [serialization API of the `node:v8` module][v8.serdes].
892892
893893
#### Considerations when transferring TypedArrays and Buffers
894894
895-
All `TypedArray` and `Buffer` instances are views over an underlying
896-
`ArrayBuffer`. That is, it is the `ArrayBuffer` that actually stores
895+
All {TypedArray|Buffer} instances are views over an underlying
896+
{ArrayBuffer}. That is, it is the `ArrayBuffer` that actually stores
897897
the raw data while the `TypedArray` and `Buffer` objects provide a
898898
way of viewing and manipulating the data. It is possible and common
899899
for multiple views to be created over the same `ArrayBuffer` instance.
@@ -942,8 +942,8 @@ those `ArrayBuffer`s unusable.
942942
943943
Because object cloning uses the [HTML structured clone algorithm][],
944944
non-enumerable properties, property accessors, and object prototypes are
945-
not preserved. In particular, [`Buffer`][] objects will be read as
946-
plain [`Uint8Array`][]s on the receiving side, and instances of JavaScript
945+
not preserved. In particular, {Buffer} objects will be read as
946+
plain {Uint8Array}s on the receiving side, and instances of JavaScript
947947
classes will be cloned as plain JavaScript objects.
948948
949949
<!-- eslint-disable no-unused-private-class-members -->
@@ -1583,21 +1583,16 @@ thread spawned will spawn another until the application crashes.
15831583
[`'online'` event]: #event-online
15841584
[`--max-old-space-size`]: cli.md#--max-old-space-sizesize-in-mib
15851585
[`--max-semi-space-size`]: cli.md#--max-semi-space-sizesize-in-mib
1586-
[`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
15871586
[`AsyncResource`]: async_hooks.md#class-asyncresource
15881587
[`Buffer.allocUnsafe()`]: buffer.md#static-method-bufferallocunsafesize
1589-
[`Buffer`]: buffer.md
15901588
[`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`]: errors.md#err_missing_message_port_in_transfer_list
15911589
[`ERR_WORKER_MESSAGING_ERRORED`]: errors.md#err_worker_messaging_errored
15921590
[`ERR_WORKER_MESSAGING_FAILED`]: errors.md#err_worker_messaging_failed
15931591
[`ERR_WORKER_MESSAGING_SAME_THREAD`]: errors.md#err_worker_messaging_same_thread
15941592
[`ERR_WORKER_MESSAGING_TIMEOUT`]: errors.md#err_worker_messaging_timeout
15951593
[`ERR_WORKER_NOT_RUNNING`]: errors.md#err_worker_not_running
1596-
[`EventTarget`]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
15971594
[`FileHandle`]: fs.md#class-filehandle
15981595
[`MessagePort`]: #class-messageport
1599-
[`SharedArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
1600-
[`Uint8Array`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
16011596
[`WebAssembly.Module`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module
16021597
[`Worker constructor options`]: #new-workerfilename-options
16031598
[`Worker`]: #class-worker

0 commit comments

Comments
 (0)