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

Safari / iOS crashes when loading https://atomicojs.dev/ #2

Open
jackrobbins1 opened this issue Feb 15, 2024 · 2 comments
Open

Safari / iOS crashes when loading https://atomicojs.dev/ #2

jackrobbins1 opened this issue Feb 15, 2024 · 2 comments

Comments

@jackrobbins1
Copy link

requestIdleCallback(() => import("@atomico/site"));

The issue is that Safari does not support requestIdleCallback:
https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback#browser_compatibility

I found a similar issue where they fixed the problem by using setTimeout as a backup in case requestIdleCallback isn't available:
remix-run/indie-stack#124 (comment)

@UpperCod
Copy link
Member

Hi @jackrobbins1, thank you for notifying me about this. I have updated it to something simpler:

window.addEventListener("load",...)

I will be attentive to your feedback, regards.

@jackrobbins1
Copy link
Author

Hi @UpperCod
I saw that the deployed site has removed requestIdleCallback() which has removed that error from iOS / Safari.

However the site is still crashing on iOS but is now working on MacOS safari.

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

2 participants