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

153
Views
Detect when a new tab is fully loaded after opening it

I am opening a new tab link with an element. var w = window.open(mailto:example@gmail.com ..., '_blank');

After that I check for when it finishes loading:

if (w != null) {
  console.log("here");

  $(w).on('load',function () {
    console.log("here2");
  }
}

However, I never get "here2" printed, even long after the tab finished loading.

Notes:

I have also tried opening youtube, still here2 wasn't printed.

I tried opening the localhost link (I am runnning this on a localhost test server), and it can detect when my same site finished loading.

Can anyone help?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can refer to this answer if the site you want to open is on the same domain as your website.

On the other side, there is nearly no hope if there is a site that does not have the same-origin content, since you will get the same-origin error.

If you have permission to add code to a "no same-origin" site (B) then you can send a signal to your original site (A) in some way (e.g. send a signal from B to the server and then send the signal return to A).

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