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

154
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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