preactjs / preact-www

:book: Preact documentation website.
https://preactjs.com
MIT License
359 stars 506 forks source link

fix: REPL style insert in FireFox #1163

Closed rschristian closed 5 months ago

rschristian commented 5 months ago

Fixes #1161

The information on this is a bit lacking, but it seems FireFox asynchronously creates the iframe doc once appended into the parent whereas Chrome and Safari do it synchronously, then, upon loading, FireFox will replace the inserted document if it's already been altered? Not 100% on that, but this seems to do the trick.