doc: clarify when messageerror is emitted

Adapting addaleax's explanation from the issue.

Fixes: https://github.com/nodejs/node/issues/36333
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36780
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
James M Snell authored and Danielle Adams committed 2021-01-12 07:10:46 -05:00
1 parent 61b039365c
commit b4091ea59b
1 file changed
+6
+6
View File
@@ -452,6 +452,12 @@ added:
The `'messageerror'` event is emitted when deserializing a message failed.
Currently, this event is emitted when there is an error occurring while
instantiating the posted JS object on the receiving end. Such situations
are rare, but can happen, for instance, when certain Node.js API objects
are received in a `vm.Context` (where Node.js APIs are currently
unavailable).
### `port.close()`
<!-- YAML
added: v10.5.0