-
Notifications
You must be signed in to change notification settings - Fork 326
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
feat(puck context):added iframe ref to the puck context #652
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@IMythx is attempting to deploy a commit to the Measured Team on Vercel. A member of the Team first needs to authorize it. |
Closes #640 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, not sure if we actually need this - the Puck iframe does have a unique ID, so this could easily done by using #preview-frame
selector.
oh i just noticed that unique id! |
Yeah, that's a valid concern, and why I haven't closed this. I think this PR requires a bit more consideration because it adds 2 new APIs ( |
added iframe ref to the puck context for the sake of accessing the
iframe.contentWindow
,iframe.contentDocument
and listening to events...etcpotential use cases
1-
to give us the ability to create useMediaQuery custom hook inside the iframe which is differnet than doing it on the global window object (personally faced that case)
2-
and of course many other potential cases