Skip to content

Commit 66e6c2a

Browse files
AzardBethGriggs
authored andcommitted
doc: add EventTarget link to worker_threads
PR-URL: #25058 Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
1 parent d1f19a0 commit 66e6c2a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/api/worker_threads.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ structured data, memory regions and other `MessagePort`s between different
125125
[`Worker`][]s.
126126

127127
With the exception of `MessagePort`s being [`EventEmitter`][]s rather
128-
than `EventTarget`s, this implementation matches [browser `MessagePort`][]s.
128+
than [`EventTarget`][]s, this implementation matches [browser `MessagePort`][]s.
129129

130130
### Event: 'close'
131131
<!-- YAML
@@ -307,10 +307,10 @@ if (isMainThread) {
307307
* `filename` {string} The path to the Worker’s main script. Must be
308308
either an absolute path or a relative path (i.e. relative to the
309309
current working directory) starting with `./` or `../`.
310-
If `options.eval` is true, this is a string containing JavaScript code rather
311-
than a path.
310+
If `options.eval` is `true`, this is a string containing JavaScript code
311+
rather than a path.
312312
* `options` {Object}
313-
* `eval` {boolean} If true, interpret the first argument to the constructor
313+
* `eval` {boolean} If `true`, interpret the first argument to the constructor
314314
as a script that is executed once the worker is online.
315315
* `workerData` {any} Any JavaScript value that will be cloned and made
316316
available as [`require('worker_threads').workerData`][]. The cloning will
@@ -463,6 +463,7 @@ active handle in the event system. If the worker is already `unref()`ed calling
463463

464464
[`Buffer`]: buffer.html
465465
[`EventEmitter`]: events.html
466+
[`EventTarget`]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
466467
[`MessagePort`]: #worker_threads_class_messageport
467468
[`SharedArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
468469
[`Uint8Array`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array

0 commit comments

Comments
 (0)