What’s wrong? There’s nothing on infobox because of that
contentDocument property of an
iFrame will be
null until it is appended to the body of the document. So in order for this to work, you will need to append the
Let me know if I can help with anything else!
Do you know how to do it? I tried many ways, but eventually I failed
It’s a bit hard as you’re only showing a fraction of your JS code. What does your HTML look like? What are you trying to do? How is it glued together?
Like Alex said, it’s hard without more information. You would have at least have to call
document.body.appendChild(a) before you could call
a.contentDocument to prevent it from crashing.