Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

76
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!