What’s wrong? There’s nothing on infobox because of that
Hi @shinseon,
This seems like less of a CesiumJS error, and more of a general Javascript one. Doing a bit of research, I found that the 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 iframe
to document.body
.
Let me know if I can help with anything else!
Best,
Janine
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?
Cheers,
Alex
Hi @shinseon,
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.
Best,
Janine