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

158
Views
how to fix window.open("").closed returns true when opening the link of google search

//if this is the link, return false
var tab = window.open("https://www.google.com.vn/", "_blank");

// if this is the link, reture true
// var tab = window.open("https://www.google.com/search?q=coin&oq=coin&aqs=chrome..69i57j0i131i433i512j0i433i512l2j46i131i199i433i465i512j0i131i433i512j46i131i199i433i465i512j0i131i433i512j0i433i512j0i512.665j0j15&sourceid=chrome&ie=UTF-8", "_blank");
// I want to know why it is true and how to fix it


setInterval(function() {
  checkTabsClosed()
}, 3000);

function checkTabsClosed() {
  console.log(tab);
  if (tab && tab.closed) {
    console.log("close");
  } else
    console.log("open");
}

about 4 years ago · Santiago Gelvez
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!