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

175
Visualizações
Complete child app ajax call when navigating in parent application

I have one main parent app with a home button which navigates the user to the main parent app landing page using document.location. My parent app renders a lot of vanilla javascript applications on run time using tiles. Each tile within my parent app represents the child vanilla js app which doesn't share its context with the parent app. Now within the child app user can initiate or execute a function which can take around a few seconds to a minute (don't ask why please). Within that time, the user can click the parent home button. Now my main question is how do I make sure that I complete my child's function execution (which is a promise) before the parent completes navigation or even initiates the navigation. Is there any workaround to this problem? I wish I could change this design but it is a legacy application with not much room for innovation.

One solution I can think of:-

When parent app starts navigation, during that event execution add script tag to the parent. In that script tag then I can run my custom code.

about 4 years ago · Juan Pablo Isaza
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