Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!