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

feat(overlay): add credentialless attribute for iframe #614

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

hrynevychroman
Copy link
Contributor

When using the WASM module to generate image previews, I faced some errors with showing iframe after setting this parameters to server inside vite.config.js

server: {
  headers: {
    'Cross-Origin-Embedder-Policy': 'require-corp',
    'Cross-Origin-Opener-Policy': 'same-origin',
  },
},

The fix for this was setting the credentialless attribute for all iframe; I think that we should add this to our overlay/iframe, too.

Chrome Blog: link

Video Example:
https://github.com/user-attachments/assets/2fbce091-91fd-4fad-a948-7e24f081a0a9

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for vue-devtools-docs canceled.

Name Link
🔨 Latest commit d7bb8b4
🔍 Latest deploy log https://app.netlify.com/sites/vue-devtools-docs/deploys/66e99621ac272800080e14a1

@webfansplz webfansplz changed the title fix(iframe): add credentialless attribute feat(overlay): add credentialless attribute for iframe Sep 19, 2024
@webfansplz webfansplz merged commit 53add6a into vuejs:main Sep 19, 2024
4 checks passed
@hrynevychroman hrynevychroman deleted the fix/iframe-credentialless branch September 20, 2024 05:22
webfansplz added a commit that referenced this pull request Sep 23, 2024
@webfansplz
Copy link
Member

Remove it temporarily because I found that adding it causes the localstorage state in the iframe to be isolated from the outside, causing some persistent state failures in the devtools client.

webfansplz added a commit that referenced this pull request Sep 23, 2024
@sqcheah
Copy link

sqcheah commented Sep 25, 2024

another thing to note is that it will cause the devtool fail to load in stackblitz playground

refer: stackblitz/webcontainer-core#1269
antfu's solution is to optionally allow iframe props: nuxt/devtools@0eb7a82

@webfansplz
Copy link
Member

another thing to note is that it will cause the devtool fail to load in stackblitz playground

refer: stackblitz/webcontainer-core#1269 antfu's solution is to optionally allow iframe props: nuxt/devtools@0eb7a82

I think this is a better way to handle this case, PR Welcome.

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

Successfully merging this pull request may close these issues.

None yet

3 participants