Closed qiweiii closed 6 months ago
My idea is to use a sharedWorker when setup chain in fromEndpoint in ChopsticksProvider
, and since comlink does not have an api for push messages, we can use Broadcast_Channel_API to publish message (which has a port property in message event that can be used by comlink.wrap). If other tab starts a fork, it ask in the channel with the endpoint, if other tab has a worker with the same rpc endpoint then respond. But there is another problem, we cannot create a worker inside a worker, need to handle how to create executor worker
Commented on pjs. This issue can be closed
https://github.com/polkadot-js/apps/issues/10305#issue-2159074338