You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using comlink to communicate between a web page and an embedded iframe. The iframe calls functions exposed from the main page. Everything works fine when iframe web page is running on dev server (vite), but stops working in production build.
In production build, the API call to main page works for the first ~25ms then stops working (this is not a stable behaviour, sometimes longer). After inspecting all messages from iframe I found a message with type RELEASE.
Then I found this in comlink's docs.
If the browser supports the WeakRef proposal, releaseProxy will be called automatically when the proxy created by wrap() gets garbage collected.
Is there a way to prevent auto release? The iframe page is like an extension, it needs to call APIs exposed from main page throughout its lifetime.
The text was updated successfully, but these errors were encountered:
I am using comlink to communicate between a web page and an embedded iframe. The iframe calls functions exposed from the main page. Everything works fine when iframe web page is running on dev server (vite), but stops working in production build.
In production build, the API call to main page works for the first ~25ms then stops working (this is not a stable behaviour, sometimes longer). After inspecting all messages from iframe I found a message with type
RELEASE
.Then I found this in comlink's docs.
Is there a way to prevent auto release? The iframe page is like an extension, it needs to call APIs exposed from main page throughout its lifetime.
The text was updated successfully, but these errors were encountered: