MCPcopy Create free account
hub / github.com/LinkedInLearning/javascript-essential-training-2832077 / mousePosition

Function mousePosition

09_02/script.js:18–21  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

16
17// Update the x and y displays to show the current mouse position.
18const mousePosition = (event) => {
19 posX.innerText = event.pageX;
20 posY.innerText = event.pageY;
21};
22
23window.addEventListener("mousemove", mousePosition, false);
24

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected