Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a9f239f

Browse filesBrowse files
AzardBethGriggs
authored andcommitted
doc: add EventTarget link to worker_threads
PR-URL: #25058 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
1 parent 00ce972 commit a9f239f
Copy full SHA for a9f239f

File tree

Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Open diff view settings
Collapse file

‎doc/api/worker_threads.md‎

Copy file name to clipboardExpand all lines: doc/api/worker_threads.md
+5-4Lines changed: 5 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
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
@@ -308,10 +308,10 @@ if (isMainThread) {
308308
* `filename` {string} The path to the Worker’s main script. Must be
309309
either an absolute path or a relative path (i.e. relative to the
310310
current working directory) starting with `./` or `../`.
311-
If `options.eval` is true, this is a string containing JavaScript code rather
312-
than a path.
311+
If `options.eval` is `true`, this is a string containing JavaScript code
312+
rather than a path.
313313
* `options` {Object}
314-
* `eval` {boolean} If true, interpret the first argument to the constructor
314+
* `eval` {boolean} If `true`, interpret the first argument to the constructor
315315
as a script that is executed once the worker is online.
316316
* `workerData` {any} Any JavaScript value that will be cloned and made
317317
available as [`require('worker_threads').workerData`][]. The cloning will
@@ -464,6 +464,7 @@ active handle in the event system. If the worker is already `unref()`ed calling
464464

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.