Repository navigation
fix: Prevent Partytown cross-origin errors in iframe environments - #3155
Merged
Merged
Conversation
mmartinsoliv
requested review from
gabpaladino and
lucasfp13
and removed request for
a team
December 12, 2025 19:33
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
mmartinsoliv
force-pushed
the
chore/remove-partytown
branch
2 times, most recently
from
December 15, 2025 19:45
e19b443 to
fe671bb
Compare
mmartinsoliv
force-pushed
the
chore/remove-partytown
branch
from
December 16, 2025 15:33
a4aba32 to
8b7d80a
Compare
gvc
approved these changes
Dec 16, 2025
Contributor
|
Hey @mmartinsoliv! Quick check: I can only see changes in ThirdPartyScripts.tsx in the diff. Are the other updates mentioned in “Changes Made” already covered elsewhere or were they reverted? |
Contributor
Author
Hi @lemagnetic! I updated the readme file. The only adjustment is adding a conditional statement. |
hellofanny
approved these changes
Jan 8, 2026
lemagnetic
approved these changes
Jan 8, 2026
thiagopereira-vtex
pushed a commit
that referenced
this pull request
Mar 10, 2026
) ## What's the problem this PR addresses? When FastStore is loaded inside an iframe (such as VTEX Preview), Partytown throws a SecurityError: Failed to read a named property 'dispatchEvent' from 'Window' due to cross-origin restrictions. This prevents the preview from working correctly. ## Changes Made: - Modified ThirdPartyScripts.tsx to dynamically import Partytown only on client-side
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's the problem this PR addresses?
When FastStore is loaded inside an iframe (such as VTEX
Preview), Partytown throws a SecurityError: Failed to read a
named property 'dispatchEvent' from 'Window' due to
cross-origin restrictions. This prevents the preview from
working correctly.
Changes Made:
Partytown only on client-side