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

122
Vistas
Pass Data From Iframe to grandparent

So essentially I have a tough case here. I have a react app that contains an iframe, and within that iframe I have data I need to get all the way to the react application. I have access to the code of the react app, and I have access to the code of the inner most iframe. I do not have access to the code of the middle iframe. If it's at all necessary to know I'm using an embedded looker dashboard with custom visualizations.

I have considered placing this into the inner most iframe

window.parent.postMessage({ message: "getAppData", value: MyDataToPass }, "*");

But would this work? Or could I do

window.parent.parent.postMessage({ message: "getAppData", value: MyDataToPass }, "*");

If there's a way to do this that'd be super helpful

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

So I poked around for barely any time at all. Using window.parent.parent.postMessage({ message: "getAppData", value: MyDataToPass }, "*"); As stated above was the answer, and listening for the message in the react app allowed me to access the data I needed.

about 4 years 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 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