I have a sandboxed iframe defined like so:
<iframe sandbox="allow-same-origin allow-scripts allow-popups allow-forms allow-modals" src="...">
</iframe>
When I set document.domain
inside the iframe, I get the following error:
Uncaught DOMException: Failed to set the 'domain' property on 'Document': Assignment is forbidden for sandboxed iframes.
How can I allow document.domain to be set within the iframe?