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

145
Visualizações
windows popup onload event not working Javascript
let newWindow = open('https://javascript.info', 'example', 'width=300,height=300');
newWindow.onload=()=>{
 alert("Popup Loaded");
}

Onload event was not triggering after the popup window is loaded.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Since it's not the same domain , you will not be able to access the window set properties.

Try this here in console

(function(ow) {
    ow.addEventListener("load", function() { alert("loaded"); }, false);
   
})(window.open('https://stackoverflow.com/', 'example', 'width=300,height=300'));

This will work

But if you put a different domain , it will not work. You'd have to use PostMessage or something else.

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