We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Mutation observers suggest that they have a weak reference to observed elements, so if the element is otherwise garbage collected, then the observer is also collected. This seems to work in practice.
However, with similar code, IntersectionObserver leaks memory. The same happens with ResizeObserver.
IntersectionObserver
ResizeObserver
https://bugs.chromium.org/p/chromium/issues/detail?id=1220041 (includes demos) - the same issue effects Firefox and Safari.
The IntersectionObserver spec should suggest that observed elements are weakly referenced, similar to MutationObserver.
MutationObserver
The text was updated successfully, but these errors were encountered:
Other browser issues:
https://bugzilla.mozilla.org/show_bug.cgi?id=1717362 https://bugs.webkit.org/show_bug.cgi?id=227194
Sorry, something went wrong.
No branches or pull requests
Mutation observers suggest that they have a weak reference to observed elements, so if the element is otherwise garbage collected, then the observer is also collected. This seems to work in practice.
However, with similar code,
IntersectionObserver
leaks memory. The same happens withResizeObserver
.https://bugs.chromium.org/p/chromium/issues/detail?id=1220041 (includes demos) - the same issue effects Firefox and Safari.
The
IntersectionObserver
spec should suggest that observed elements are weakly referenced, similar toMutationObserver
.The text was updated successfully, but these errors were encountered: