I have the following iframe:
<iframe style="width:100%;border:none;margin:100px 0px;" scrolling="no" src="https://seifti.io/document/policy/priva?l=es&c=f8ba59746ab55688799b9b16ebac73d749952ebcc5ae4d9d91d939d5c48f3baf" onload="this.style.height=this.contentWindow.document.documentElement.scrollHeight+'px'"></iframe>
The content loads correctly, but the following function that executes onload:
this.style.height=this.contentWindow.document.documentElement.scrollHeight+'px'
which aims to set the appropiate height of the iframe based on its content's length, provokes the following error on the browser:
Uncaught DOMException: Blocked a frame with origin "http://seifti.test" from accessing a cross-origin frame at HTMLIFrameElement.onload http://seifti.test/site/policy/privacy:222:317)
I do understand that the browser would not allow me to manipulate the iframe's content by using Javascript, but in this case I'm just trying to update it's height?
What would be the best workaround?