react-frame-component icon indicating copy to clipboard operation
react-frame-component copied to clipboard

Add document.write() fallback

Open andrewpye opened this issue 1 year ago • 2 comments

As per https://github.com/ryanseddon/react-frame-component/issues/169#issuecomment-1769738677, this PR adds a new dangerouslyUseDocWrite prop to the Frame component as an "escape hatch" that allows consumers to fall back to using document.write() to populate the frame's initial content. This is usually not advisable, but some libraries such as Recaptcha and Google Maps will only work with certain values of the frame's location and/or origin, and the current srcdoc approach for initial content population is incompatible with these libraries.

andrewpye avatar Nov 02 '23 12:11 andrewpye

Thanks for the input on this @ryanseddon 🙇 We've got a couple of heavy projects on the go at the moment so this has been sidelined whilst those are underway. I hope to return to it once they're shipped so we can wrap this up 🤞

andrewpye avatar Nov 29 '23 15:11 andrewpye