GoogleChromeLabs / GoogleChromeLabs/comlink
How to releaseProxy from the `expose()` side?
Open
- Dominant language
- TypeScript
- Stars
- 12.8k
- Forks
- 435
- PR merge metrics
- No merged PRs in 30d
Description
I am exposing JS object to iframe from the main thread.
When I navigate between pages, the object gets exposed to iframe window multiple times, and got repeated requests.
If I enter the page with iframe 3 times, a request from iframe will trigger 3 times.
After some experiment I found that if I releaseProxy from within iframe, the problem is gone.
But I don't have full control over the content in iframe, thus need to find a way to release proxy from the `expose()` side (main thread)
Contributor guide
Assessment
This issue has not been assessed yet.