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: components render inside external zoid iframes #986

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

Seavenly
Copy link
Collaborator

Description

We currently have a util function isZoidComponent() that we use to prevent certain logic from running inside or IFrames, such as scanning the page for elements with the data-pp-message attribute to auto-render messages. This check looks for __zoid__ windows to prevent this. This has a side-effect of preventing other merchants from using zoid to render our components inside an IFrame. The following change has been made to help address this:

  • Update the isZoidComponent() util to explicitly look for the tags of our zoid components

Screenshots

N/A

Testing instructions

Attached is an example that can be placed into the demo/ directory to reproduce the scenario.
paypal-zoid.zip

@erikacolette29 erikacolette29 merged commit 72a1831 into paypal:develop Sep 20, 2023
49 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 20, 2023
### [1.48.1](v1.48.0...v1.48.1) (2023-09-20)

### Bug Fixes

* components render inside external zoid iframes ([#986](#986)) ([72a1831](72a1831))
@github-actions
Copy link

🎉 This PR is included in version 1.48.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants