This is a demo app to showcase how to support multiple comlink connections in the same parent window. You can see the working sample here: https://wix-tpa.surge.sh/
- Once the parent loads, it waits for a handshake message from each iframe
- When iframe loads, it sends a handshake message to parent with bridge data (comlink + version)
- Parent window creates
MessageChannel
to open up a communication port to each iframe - Parent window ramps up a comlink connection with the right version for that iframe
This solution relies on wix-dashboard-iframe-sdk which holds the mechanism for iframe handshake.
Start the project by running:
yarn install
yarn