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

Lazy loading on safari #265

Open
jinyus opened this issue Feb 8, 2023 · 2 comments
Open

Lazy loading on safari #265

jinyus opened this issue Feb 8, 2023 · 2 comments

Comments

@jinyus
Copy link

jinyus commented Feb 8, 2023

The docs mention that lazy hydration is implemented with requestIdleCallback but no version of safari supports this: https://caniuse.com/?search=requestIdleCallback

Does the framework adjust its behavior when running on safari or should we avoid using this option if we want to target iOS/Mac?

@vlrevolution
Copy link

Interested to hear about this as well.

@billyohgren
Copy link

I think they use a simple polyfill for that, by looking at the code:

const requestIdleCallback = window.requestIdleCallback || ( cb => window.setTimeout(cb,1) );

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

3 participants