Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to releaseProxy from the expose() side? #674

Open
HuakunShen opened this issue Nov 16, 2024 · 2 comments
Open

How to releaseProxy from the expose() side? #674

HuakunShen opened this issue Nov 16, 2024 · 2 comments

Comments

@HuakunShen
Copy link

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)

@michalkvasnicak
Copy link

I have same issue, need to be able to clean up after expose().

@HuakunShen
Copy link
Author

HuakunShen commented Nov 30, 2024

It seems like no one is reponding to thr issues, I ended up implementing my own rpc library. I works so great so far for myself.

https://docs.kkrpc.kunkun.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants