-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Description
We are using this project in a Firefox/Chrome web extension. RasterizeHTML is included as a content script (ie. insecure context).
PROBLEM: Firefox is blocking Rasterize from opening an iFrame in the insecure context. Basically, all actions on the iframe.contentDocument are banned: open, write, close, etc.
I fixed the problem locally by changing the following:
iframe.contentDocument.open()
...
iframe.contentDocument.write("<!DOCTYPE html>");
iframe.contentDocument.write(html);
iframe.contentDocument.close();
to:
iframe.srcdoc = `<!DOCTYPE html>${html}`;
We cannot use Rasterize from the extension's background scripts (ie. from a secure context) because in Chrome manifest V3, background scripts will not have access to the DOM.
Would it be possible for someone at Rasterize to address this issue, so that we can use your CDN directly with no security errors in FF insecure context?
Metadata
Metadata
Assignees
Labels
No labels