Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

138
Vistas
Cross-origin issue when updating the iframe's height. Content loads correctly

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?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda