Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

133
Views
Problema de origen cruzado al actualizar la altura del iframe. El contenido carga correctamente

Tengo el siguiente 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>

El contenido se carga correctamente, pero la siguiente función que se ejecuta onload :

 this.style.height=this.contentWindow.document.documentElement.scrollHeight+'px'

que tiene como objetivo establecer la altura adecuada del iframe en función de la longitud de su contenido, provoca el siguiente error en el navegador:

 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)

Entiendo que el navegador no me permitiría manipular el contenido del iframe usando Javascript, pero en este caso solo estoy tratando de actualizar su altura.

¿Cuál sería la mejor solución?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!