Here’s an example: I’m trying to embed a youtube video in an infobox. Instead, I get a black box with an error message. Pulling open js console reveals the error: “Blocked script execution in ‘Climbing Max Patch with Chef Boyardee - YouTube’ because the document’s frame is sandboxed and the ‘allow-scripts’ permission is not set.”
Here’s the code for the iframe inside the infobox description:
<div style="height:315px;"><iframe sandbox="allow-same-origin allow-scripts allow-popups allow-forms" width=100% height="315" src="https://www.youtube.com/embed/wo5rWeeZxvo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
It looks like I set the allow-scripts attribute for the infobox itself as well:
//set attributes for infobox var iframe = document.getElementsByClassName("cesium-infoBox-iframe"); iframe.setAttribute( "sandbox", "allow-same-origin allow-scripts allow-popups allow-forms" );
I’m having the same problem with any infoboxes with iframes in the description. Notable: this worked across all browsers when I launched the project last January, and has stopped working since then. What am I missing?