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

Handle iframes with srcdoc #25

Closed
Treora opened this issue Jul 23, 2018 · 2 comments · Fixed by #59
Closed

Handle iframes with srcdoc #25

Treora opened this issue Jul 23, 2018 · 2 comments · Fixed by #59
Labels
snapshot quality Improving fidelity/size/durability/etc of the output

Comments

@Treora
Copy link
Contributor

Treora commented Jul 23, 2018

We currently do not handle content of an <iframe srcdoc="....">. We inline the iframe's inner doc, when available, into the src as a data: URL, regardless whether it came from the src or from a srcdoc; but a viewer will use the srcdoc instead of src when it is available, thus things break.

We could choose to always remove srcdoc attributes (or always use them), or we could process srcdoc content as a subresource (except we don't even need to fetch it, and its base URL is equal to the parent document's base URL) and keep it in the srcdoc attribute. Or something in between.

@Treora
Copy link
Contributor Author

Treora commented Sep 24, 2018

Similarly, a (i)frame without either src or srcdoc is ignored. The frame may nevertheless have content inserted into it by a script (e.g. Etherpad content is currently not stored because of this issue). Time to start seeing a frame as more than just a single subresource..

@Treora
Copy link
Contributor Author

Treora commented Oct 8, 2018

Another note: a frame with e.g. an image as its src will, both in Firefox and Chromium (but each slightly differently), be rendered into an ad-hoc generated DOM. We currently snapshot that DOM, but should just inline the image file instead.

@Treora Treora added the snapshot quality Improving fidelity/size/durability/etc of the output label Apr 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snapshot quality Improving fidelity/size/durability/etc of the output
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant