Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import { fromEvent } from "rxjs";
let span = document.querySelector("#span-location");
fromEvent(document, "mousemove")
.subscribe((e) => {
span.innerHTML = `X: ${e.clientX} - Y: ${e.clientY}`;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.