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 );
});
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