Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

126
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda