Created
June 9, 2018 22:35
-
-
Save ssougnez/7de3fbc98bf47f71ce68dcea6645cdaa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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