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

Variable not available inside of iframe #33

Open
felixranesberger opened this issue Jun 7, 2024 · 2 comments
Open

Variable not available inside of iframe #33

felixranesberger opened this issue Jun 7, 2024 · 2 comments

Comments

@felixranesberger
Copy link

My Vitepress local data loader is not available inside the <iframe> attribute.

Do you know how I can fix this?

Screenshot 2024-06-07 at 13 40 14
@bluwy
Copy link
Owner

bluwy commented Jun 12, 2024

Unfortunately this seems like an edgecase with the current architecture. when extracting out the contents in the iframe declaration, any variables that are derived from the state of the component, e.g. the props or v-for, are not transferred over to the iframe.

It should be possible to fix this to support cases like this, but I'm currently not actively maintaining this at the moment.

@felixranesberger
Copy link
Author

Thanks for your answer! When hosting the iFrame on the same URL, I could possibly use something like localStorage to make the content accessible in the iFrame.

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

No branches or pull requests

2 participants