PDFs won't render in Chrome #1314
Labels
[Aspect] Website
[Package][@wp-playground] Remote
[Type] Bug
An existing feature does not function as intended
In #1298 we enabled PDF loading in Playground, but it still didn't allow PDF previews in Chrome while it works in Firefox (try this blueprint).
It turns out that any sandbox attribute on iframes will block PDFs from loading. I couldn't find any documentation on it but a comment from StackOverflow suggests the same.
There is a note in the MDN documentation about embedded documents: it is strongly discouraged to use both allow-scripts and allow-same-origin, as that lets the embedded document remove the sandbox attribute. I assume that Chrome does something different.
We explored removing the sandbox attribute in #1313 but decided that it's not worth the risk.
The text was updated successfully, but these errors were encountered: