Skip to content

Commit 9ac4047

Browse files
committed
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 3518919 commit 9ac4047

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
@@ -452,6 +452,12 @@ added:
452452

453453
The `'messageerror'` event is emitted when deserializing a message failed.
454454

455+
Currently, this event is emitted when there is an error occurring while
456+
instantiating the posted JS object on the receiving end. Such situations
457+
are rare, but can happen, for instance, when certain Node.js API objects
458+
are received in a `vm.Context` (where Node.js APIs are currently
459+
unavailable).
460+
455461
### `port.close()`
456462
<!-- YAML
457463
added: v10.5.0

0 commit comments

Comments
 (0)