Forum Discussion
pratikdarak21
Apr 14, 2025Iron Contributor
Issue related to "Blocked script execution in <URL>" in Embed Webpart | SharePoint Online
Hi, I have created one HTML file which having code related to Image Map element. After uploading html file to site assets library using embed code of it in the "Embed" webpart giving an error while ...
George09
Apr 14, 2025Copper Contributor
Hey Pratik, this happens because the SharePoint Online Embed webpart runs in a sandboxed iframe that restricts things like JavaScript execution and pop-ups by design. Unfortunately, you can’t enable allow-popups in that iframe manually.
A workaround would be to use a Script Editor webpart (available via classic pages or third-party SPFx solutions) or build a custom SPFx webpart to embed your HTML with full control. That way, your image map links and scripts should work without those sandbox restrictions.
Hope this helps!