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

[🐞] window.navigator.cookieEnabled returns undefined #414

Closed
XiNiHa opened this issue May 30, 2023 · 0 comments · Fixed by #539
Closed

[🐞] window.navigator.cookieEnabled returns undefined #414

XiNiHa opened this issue May 30, 2023 · 0 comments · Fixed by #539
Labels
bug Something isn't working

Comments

@XiNiHa
Copy link

XiNiHa commented May 30, 2023

Describe the bug

The third-party script I am using checks window.navigator.cookieEnabled to determine whether or not to run the script. While this works perfectly fine in the main window, window.navigator.cookieEnabled returns undefined in the Partytown worker. This makes the whole script can't be executed with Partytown.

Reproduction

https://github.com/XiNiHa/partytown-cookieenabled-repro

Steps to reproduce

  1. Clone, pnpm i, pnpm dev
  2. Check the console. Note that the log from the main window logs true/false, and the one from Partytown logs undefined.

Browser Info

Verified in Firefox and Chrome

Additional Information

No response

@XiNiHa XiNiHa added the bug Something isn't working label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant