Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda