GoogleChromeLabs / GoogleChromeLabs/comlink
Close or Terminate events on Comlink SharedWorker proxy for cleanup on Page or SharedWorker side
Open
- Dominant language
- TypeScript
- Stars
- 12.8k
- Forks
- 435
- PR merge metrics
- No merged PRs in 30d
Description
When a page is closed or SharedWorker Terminated, there should be a way to notify SharedWorker for any required cleanup(in my case websocket STOMP subscriptions)
When shared worker is terminated, there should be a way to reload shared worker, at least some guidance in documentation will be very helpful.
I used heartbeat polling to achieve same(https://github.com/sivayapps/ws-lib), but it would be very helpful if documentation suggests any standard way of doing it with Comlink.
Contributor guide
Assessment
This issue has not been assessed yet.