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

77
Visualizações
Why does hit test seem to be calling my code in chrome devtools perf tab

I have a website I'm working on where there is an iframe which calls document.elementFromPoint in a loop in an event handler a bunch of times. I did a performance snapshot of the code and saw something strange.chrome dev tools perf tab, hit test is above event handler and element from point. It seems like hit test, which is a internal browser thing, is calling my anonymous event handler which is calling element from point. But this doesn't make any sense. It should be that my event handler is calling elementFromPoint which then should be calling hit test, assuming hit test is what is internally used in elementFromPoint. Also I don't see why there seem to be gaps in the main thread. Can anyone explain why this is happening?

Other details.

  • The Iframe has same origin
  • document.elementFromPoint is getting svg elements

What I have found.

  • When the loop is not so long the order is correct, my code calls elementfrompoint calls hit test.
  • Long loops seem to cause the issue
about 4 years ago · Juan Pablo Isaza
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