react-frame-component
react-frame-component copied to clipboard
Add document.write() fallback
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.
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 🤞