GoogleChromeLabs / GoogleChromeLabs/comlink

Close or Terminate events on Comlink SharedWorker proxy for cleanup on Page or SharedWorker side

Open
#554 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.