pixiebrix-extension icon indicating copy to clipboard operation
pixiebrix-extension copied to clipboard

Remove the hack for iframes using srcdoc + sandbox

Open fungairino opened this issue 1 year ago • 0 comments

Currently we use a hack to remove the sandbox attribute from iframes that use the srcdoc and sandbox attribute in order for our content script to be properly injected into the frame. For more context on the hack, see: https://github.com/pixiebrix/pixiebrix-extension/issues/8927 and https://pixiebrix.slack.com/archives/C07DQ2J7C78

Ideally we could just enable "match_origin_as_fallback": true for our content script configuration in the manifest.json, but we run into a chromium bug regarding dynamic imports within a sandbox frame.

This issue tracks removing the above-mentioned hack once the related chromium issues have been fixed: https://issues.chromium.org/issues/355256366 https://issues.chromium.org/issues/40564567

The related end-to-end test should still pass once this hack is removed. https://github.com/pixiebrix/pixiebrix-extension/blob/1b2eb68becfd8084001c7228521712a55f9b85ec/end-to-end-tests/tests/runtime/srcdocFrames.spec.ts#L24

fungairino avatar Jul 29 '24 19:07 fungairino