This script is used to determine whether a dynamically generated iframe should be delayed or not before writing the source.
So you include this code, and a "some point" iframedelay.active
is set to true
. When your user hits "run code" you create the iframe, and you check this value. If it's true
, you need to setTimeout(writeCode, 0)
to allow for a reflow.
Arguably, just ditch all this code, and always write in a setTimeout, 0
to be sure.