Skip to content

Commit

Permalink
Allow frame to send the message port
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
natebosch committed Jul 28, 2023
1 parent 37e54e3 commit c645686
Show file tree
Hide file tree
Showing 3 changed files with 651 additions and 122 deletions.
1 change: 1 addition & 0 deletions pkgs/test/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Change "compiling <path>" to "loading <path>" message in all cases. Surface
the "loading" messages in the situations where previously only "compiling"
message would be used.
* Support browser tests where the frame creates the message channel.

## 1.24.4

Expand Down
Loading

0 comments on commit c645686

Please sign in to comment.