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
IntersectionObserver needs to be properly cleaned up #4035
Comments
Ah, yes, and because we never get a |
Oh I only remove the the |
Nope, the right fix would be to either implement |
@zhouyx I think the smaller race here is still around, but lower priority Basically we need to check in the callback whether the iframe still exists. |
Currently we just null it. Instead we should call
destroy
or similar. In this we need to e.g. cancel the timeout if we have one scheduled. Otherwise we might post messages to windows which no longer exist.Similarly, we fail to deregister on
detachedCallback
. Becauseamp-sticky-ad
removes the ad, we never learn about this.We should consider calling
unlayoutCallback
fromdetachedCallback
by default. @dvoytenko @jridgewell@erwinmombay I think this might cause the postMessage errors.
The text was updated successfully, but these errors were encountered: