-
Notifications
You must be signed in to change notification settings - Fork 10
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
chore: simulate cross-origin iframe in editor demo page #4460
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle Analysis for @serlo/frontendThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Could you give a simple example of something that works same-origin but would fail with the new setup (for testing)? |
The interactive video worked fine in same-origin, but got stuck in loading for cross-origin. Maybe that is easy to test.
|
chore(editor-dev): simulate cross origin with one dev server
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.
👍
The editor preview page is wrapped in an iframe where the embed using a subdomain. This simulates the cross-origin iframe embedding we have in the LTI integrations.
With this, we can quickly check if editor code changes also work in the LTI world. Also, we can quickly test iframe security attributes like
sandbox
andallow
.Unexpectedly, hot reload still works even though we are in an iframe. 🥳
However, the state is not added to the browser address bar.