I'm trying to change style inside an iframe, I gave to the iframe the sandbox="allow-same-origin allow-scripts"
attribute but I still get 'Blocked a frame with origin' what more can be the issue ?
<iframe
height="100%"
sandbox="allow-same-origin allow-scripts"
src={formLink}
onLoad={event => {
console.log('event', event, event.target);
const iframeEle = event.target;
const iframeEleDocument = (iframeEle.contentWindow || iframeEle.contentDocument);
console.log('iframeEleDocument', iframeEleDocument);
debugger;
iframeEleDocument.body.style.backgroundColor = "red";
}}
/>