WordPress / WordPress/wordpress-playground
Issue with cross-origin isolation
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 462
- Avg merge
- 18h 44m
- Merged PRs (30d)
- 33
Description
I’m not 100% sure whether this issue I’m having needs fixing in playground or Gutenberg.
I’m trying to get my Media Experiments plugin running in playground. To try it: https://playground.wordpress.net/?mode=seamless&blueprint-url=https://raw.githubusercontent.com/swissspidy/media-experiments/main/blueprints/playground.json
The plugin sets Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp HTTP headers on the post editor page to force cross-origin isolation.
The block editor is iframed. The Iframe component tries to access node.contentDocument but because the iframe seems to be on a different origin, that property is null and the editor crashes.
Do you have any idea how this issue could be resolved? I’d really love folks to be able to test my plugin in playground.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the crash with the linked Playground URL and blueprint, then inspect Gutenberg's packages/block-editor/src/components/iframe/index.js around lines 138-140. Trace why node.contentDocument is null when the plugin sets the cross-origin isolation headers, and determine whether the fix belongs in Playground or Gutenberg. Done means the Media Experiments plugin can run in Playground without the block editor crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wasm
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100