DEV Community

Discussion on: How to Load HTML, CSS, and JS Code into an iFrame

Collapse
 
pulljosh profile image
Josh Pullen • Edited

If your <script> is placed at the bottom of the <body>, it should run after the iframe exists in the DOM, so you're all good. If you're placing the <script> inside the <head> then you would need to grab the iframe and set its source after the body loads.