Blocked script execution in because the document’s frame is sandboxed – Angular application

The error message warns that an Iframe is sand-boxed without a proper privileges

Yes, you are clicking in an iFrame. This is an example of a sand-boxed iFrame.

<iframe sandbox src="http://usercontent.example.net/getusercontent.cgi?id=12193"></iframe>

If you inspect element on GMail, you will notice iFrames everywhere. The sandbox attribute is not always automatically attached, because the sandbox attribute controls what is allowed.

When a pop-up is needed, the attribute will change

<iframe sandbox="allow-same-origin allow-scripts allow-popups allow-forms" src="http://usercontent.example.net/getusercontent.cgi?id=12193"></iframe>

This is done to protect the user and the mail application from XSS

The iFrame has to allow pop-ups, new windows, or scripts. Whatever you are trying (probably just navigation), the action is being blocked by a sandbox.

Leave a Comment