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: simplify feature detections csp policies #302

Merged
merged 5 commits into from Jun 19, 2022

Conversation

guybedford
Copy link
Owner

This fixes CSP support with a number of enhancements:

  • Fixing the case where HTMLScriptElement.supports('importmap') === false skips the import map detection as it should have been doing already
  • Updating the internal feature detections to use blobs instead of data URIs so that it's only necessary to add blob: to the policy and not both blob: and data: for easier usage
  • The document.write path in the iframe feature detection is again modified to attempt a srcdoc approach first before falling back to document.write. This avoids a bunch of warnings and possible issues with using document.write by default. Hopefully this finally gets us to a middle ground on that case.
  • A new clear error message is thrown by the Wasm build when eval is not supported, to avoid possible obscure errors.

@guybedford guybedford merged commit b31f09e into main Jun 19, 2022
@guybedford guybedford deleted the feature-detection-csp-fixes branch June 19, 2022 23:15
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

1 participant