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

143
Visualizações
DOMContentLoaded will be fired twice on my page

In my page at http://www.sybase-recovery.com/outlook-repair/, I write a very simple script theme1.js at http://www.sybase-recovery.com/wp-content/themes/datanumen/js/theme1.js, as below:

document.addEventListener('DOMContentLoaded', function () {
    var b = 1;
});

But during the debug, I find DOMContentLoaded event will be fired twice when pressing Ctrl + F5 to load the page.

I try to search online, and find two results:

  1. DOMContentLoaded event firing twice for a single page load, which said AVG add-on causes the issue, but I do not have AVG add-on installed.
  2. http://forums.mozillazine.org/viewtopic.php?f=19&t=1590225, which provides a solution at https://developer.mozilla.org/en/Code_snippets/Tabbed_browser#Detecting_page_load, but the link is broken.

Has anyone encountered a similar issue?

Thank you

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

0

Because your page has an iframe

<iframe width="100%" height="800px" src="http://www.sybase-recovery.com/support/documentation/outlook-repair/"></iframe>

It also includes the same theme1.js file

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