Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow frame to send the message port (#2068)
Towards #2065 Handle the new communication pattern from the host side. Allows the frame to send a single `'port'` message with a read `MessageChannel` in stead of the `{'ready': true}` message signalling that the host should send a message port. This will remove one hop in the communication pattern. Retains handling of the current pattern and does not update the frame side yet. There are multiple implementations of both the host and the frame behavior. All host implementations will be updated to allow either pattern before the frame implementations are updated. Change from a `if/else` chain to a `switch`. Use pattern matching to destructure the `'data'` field in the case of exceptions. Don't append the frame to the dom until the window message listener is listening.
- Loading branch information