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

fix: exit early when both atomics and ServiceWorker are not supported #237

Merged

Conversation

slawekkolodziej
Copy link
Contributor

This PR fixes a bug that prevents some 3rd party scripts from loading in browsers that does not support service workers and atomics.

Partytown initializes all of the properties listed in the 'forwarded' array. However, at this point, it does not check to see if the browser supports the required features; this is done later. As a result, some third-party scripts may mistakenly perceive themselves as already loaded (for example FB pixel checks if the fbq property is present).

In my experience, the most common browser that does not support Partytown is... the iOS in-app browser! Users who click on Facebook ads see your website without Partytown loaded.

@vercel
Copy link

vercel bot commented Aug 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
partytown ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 8:16am

@adamdbradley
Copy link
Contributor

It doesn't appear the e2e tests are passing with this PR. Would you be able to further debug why the test isn't passing? Thanks

@slawekkolodziej
Copy link
Contributor Author

Yeah, I saw that. I’ll try to find some time this week.

@mhevery mhevery merged commit 3e8b049 into QwikDev:main Sep 6, 2023
@mhevery
Copy link
Contributor

mhevery commented Sep 6, 2023

Thank you for your contribution.

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

Successfully merging this pull request may close these issues.

3 participants