Sandbox in Iframe Component

738 views
Skip to first unread message

Glennise Pascua

unread,
Nov 12, 2015, 6:09:39 PM11/12/15
to Google Web Designer beta
How can i escape the sandbox of the iframe component within GWD. I have clicks from a loaded HTML document that are not working. Instead it is giving me this message:

Blocking opening in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.

Nick Wilcox

unread,
Apr 6, 2017, 4:19:36 PM4/6/17
to Google Web Designer beta
We have this issue constantly developing banners for our Fortune 500 company.  A response to this would be appreciated!

njef...@rangempls.com

unread,
Jun 7, 2017, 2:43:04 PM6/7/17
to Google Web Designer beta
We're have a very similar issue. Clicks from our ads land on our website, but none of the Javascript can load. The console is littered with these errors:

"Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag."

Our ads are basically worthless due to this.

Dale Fenton

unread,
Jun 9, 2017, 9:18:37 AM6/9/17
to Google Web Designer beta
If you all are using the iframe component within GWD you can go to the code view and within the <iframe> element in the web component definition you can set the sandbox features you want to allow. By default all features are blocked I believe. You can see what's available on the sandbox attribute here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe

If you're just loading your own content through the iframe you should be OK, but if loading content from outside sources you should be careful enabling these types of features as they can potentially allow for unsafe actions which is why they are disabled by default.


Screen Shot 2017-06-09 at 9.15.24 AM.png

Nivesh Rajbhandari

unread,
Jul 20, 2017, 5:17:02 PM7/20/17
to Google Web Designer beta
Hi,

The gwd-iframe component already sets the "allow-same-origin" flag in the sandbox attribute (along with allow-forms and allow-scripts). How is your ad being served? Please verify your publisher isn't placing additional restrictions in the iframe that loads the ad itself (not the gwd-iframe component in the ad).

Thanks!
Reply all
Reply to author
Forward
0 new messages