Skip to content

Commit a800b5b

Browse files
jasnelltargos
authored andcommitted
doc: clarify when messageerror is emitted
Adapting addaleax's explanation from the issue. Fixes: #36333 Signed-off-by: James M Snell <[email protected]> PR-URL: #36780 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
1 parent e973bdc commit a800b5b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/api/worker_threads.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,12 @@ added: v14.5.0
356356

357357
The `'messageerror'` event is emitted when deserializing a message failed.
358358

359+
Currently, this event is emitted when there is an error occurring while
360+
instantiating the posted JS object on the receiving end. Such situations
361+
are rare, but can happen, for instance, when certain Node.js API objects
362+
are received in a `vm.Context` (where Node.js APIs are currently
363+
unavailable).
364+
359365
### `port.close()`
360366
<!-- YAML
361367
added: v10.5.0

0 commit comments

Comments
 (0)