Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Last active April 22, 2019 08:27
Show Gist options
  • Save Mayankgupta688/2c5b4c46d032053f59e4095ad07ef61b to your computer and use it in GitHub Desktop.
Save Mayankgupta688/2c5b4c46d032053f59e4095ad07ef61b to your computer and use it in GitHub Desktop.
import { fromEvent } from 'rxjs';
const clicksInDocument = fromEvent(document, 'click');
clickInDocument.subscribe(function(event) {
console.log("X Co-ordinates for click Event: " + event.x);
console.log("Y Co-ordinates for click Event: " + event.y);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment