Skip to content

[fix] ⚡️ Use RO singleton instead of iframe if supported #8019

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

Closed
wants to merge 2 commits into from

Conversation

TheCymaera
Copy link
Contributor

Uses ResizeObserver singleton for add_resize_listener instead of iframes if it is supported by the runtime.

Fixes #7583
Fixes #4233

@TheCymaera TheCymaera changed the title ⚡️ Use RO singleton instead of iframe if supported [fix] ⚡️ Use RO singleton instead of iframe if supported Nov 10, 2022
@Conduitry
Copy link
Member

I forget where this was mentioned, but we do need these to be separate bindings, because the ResizeObserver is measuring something slightly different from the existing iframe mechanism, and we don't want people's results to change if they suddenly start using ResizeObserver.

@dummdidumm
Copy link
Member

dummdidumm commented Nov 10, 2022

Also see #5963 which is already an attempt at implementing this, but stalled due to difficulties around the initial size. I you want you can pick up the work in #5963 instead.

@TheCymaera
Copy link
Contributor Author

TheCymaera commented Nov 10, 2022

Found the comment: #5524 (comment)
What if I put it behind a compiler option?

resizeDetection: "iframe"|"resizeObserver"|"auto"

If so, what should the default be?
Edit: Maybe should use "iframe" for default and decide again for 4.0.

@TheCymaera TheCymaera closed this Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants