Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

115
Vistas
Change div style inside iframe react

I am working in a next js project and have implemented an iframe inside a component. Problem is I want to change the style of the div inside the iframe which loads after the iframe is rendered in the component. I am unable to select the div with id "embed" inside the iframe.
enter image description here

Is there any way to select the div in react ? I have tried using contentWindow and still its not working.

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

There is no way to access the content of an iframe if the document in the iframe is from a different domain. This is by design.

Read about Cross-origin script API access on MDN: https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#cross-origin_script_api_access

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.