Files
node/lib
Anna Henningsen 5adda2c447 worker: use fake MessageEvent for port.onmessage
Instead of passing the payload for Workers directly to `.onmessage`,
perform something more similar to what the browser API provides,
namely create an event object with a `.data` property.

This does not make `MessagePort` implement the `EventTarget` API, nor
does it implement the full `MessageEvent` API, but it would make
such extensions non-breaking changes if we desire them at
some point in the future.

(This would be a breaking change if Workers were not experimental.
Currently, this method is also undocumented and only exists with
the idea of enabling some degree of Web compatibility.)

PR-URL: https://github.com/nodejs/node/pull/26082
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2019-02-15 23:16:16 +01:00
..
2019-02-08 15:34:10 +01:00
2019-02-09 20:22:45 +01:00
2018-11-20 10:42:31 -08:00
2019-02-01 19:06:58 -08:00
2019-01-16 12:41:56 +09:00
2019-01-28 16:25:07 -08:00
2019-02-03 20:40:16 +01:00