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

136
Visualizações
Is there a way to execute rest of the script after performing window.location change?

Working on small chrome extension using manifest v3. Basically I have a line in my code that changes the window location to another page (it is required). The following line is supposed to find the element once the window has changed.

abstract:

window.location = "link to other web"
const element = document.querySelector("div")
console.log(element)

The problem is of course the fact that lines after window.location doesn't work because they do not exist anymore. Is there a way to keep the logic after the refresh/reload?

Perfectly if it would work like selenium (in brower, not in window). As mentioned I'm using manifest v3 api so maybe there is a way to keep the 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