Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

167
Vistas
How do we trigger an onClick event on all element inside an imaginary rectangle with a given coordinate in vanilla javascript?

How do we trigger an onClick event on all element inside an imaginary rectangle with a given coordinate in vanilla javascript? Let's assume that we have a rectangle with the following xy coordinate (0,30) (0,40) (30,30) (30,40), and I want to trigger an onClick event on every DOM element with class .select-element inside of that rectangle. How do I do this? Is it possible?

I saw there's this method

Document.elementFromPoint()

But triggering this method for every coordinate seems like a bad idea for performance issues.

https://developer.mozilla.org/en-US/docs/Web/API/Document/elementFromPoint Also, it is relative to the viewport, and doesn't accept a flag for using the absolute coordinate of a DOM element.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda