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

150
Vistas
Names for X/Y coordinates of an addEventListener parameter function

In the below code addEventListener takes a function as parameter. My question is where can I find the documentation for the evt.x and evt.y notations.

canvas.addEventListener("click", getCoords);

function getCoords(evt){
    console.log(evt.x, evt.y);
    }

I saw in another stackoverflow question that instead of a canvas when the window object used the evt.x becomes evt.clientX and evt.y becomes evt.clientY

window.addEventListener("click",function(evt){
    console.log(evt.clientX , evt.clientY );
});
about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

MDN Docs say that x, y are just aliases for clientX, and clientY

You can find the mdn docs here: https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event

about 4 years ago · Santiago Gelvez Denunciar
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