I love education and technology! If you ever want help with anything, please message me here on Dev, on Twitter (@PullJosh), or by email (hello@joshuapullen.com)
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.