fastmail/Squire

Attempt to wrap in iframe is failing

bonafideduck opened this issue · 4 comments

I was attempting to place the html document in an iframe and am running into an issue where some events don't fire. I see that a lot of ownerDocument references have been removed in the initial Squire 2.0 commit and suspect it might be related since some events may need to come from the iframe. I also see in 2016 squire worked out of an iframe by default.

Is there any history or philosophy to these changes?

@neilj and @tjwds

tjwds commented

Yes, using Squire in an iframe was deprecated with the Squire 2.0 release to ensure compatibility with modern frontend projects and future maintainability: https://github.com/fastmail/Squire/blob/master/CHANGELOG.md#removed

@tjwds , thanks for the quick response. I was hoping to place this in an iframe for the isolation. I realize that dompurify does a great job of blocking, but I was hoping to be absolutely sure by disabling scripts and remote data access in the iframe .

Since you dropped the iframe support, it probably was for a good reason and might stop me from going down a fools errand of trying to get the above working. So any cautionary tales would be greatly appreciated.

Also, if I were able to add back iframe support, would an MR be considered, or would that just be a waste of effort?

Thanks,

=mark

neilj commented

Also, if I were able to add back iframe support, would an MR be considered

Very unlikely. We don't plan to add options to Squire, just provide a recommended way of doing things.

Thanks for the feedback. My plan would have not involved any settings. Just that if the element it was attached to were an iframe, it would just work. The fix would involve using the ownerDocument of the iframe instead of global document.