Created
June 12, 2018 06:42
-
-
Save ChaosJohn/ce118c54d01e4ef108ed3475754907ca to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/wekupe
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.9/rx.lite.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
1, 2 | |
<script id="jsbin-javascript"> | |
var moves = Rx.Observable.fromEvent(document, 'mousemove'); | |
moves.throttle(1000).subscribe(function(event) { | |
document.body.innerHTML = event.x + ', ' + event.y; | |
}); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.9/rx.lite.js"><\/script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
1, 2 | |
</body> | |
</html></script> | |
<script id="jsbin-source-javascript" type="text/javascript">var moves = Rx.Observable.fromEvent(document, 'mousemove'); | |
moves.throttle(1000).subscribe(function(event) { | |
document.body.innerHTML = event.x + ', ' + event.y; | |
});</script></body> | |
</html> |
This file contains hidden or 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
var moves = Rx.Observable.fromEvent(document, 'mousemove'); | |
moves.throttle(1000).subscribe(function(event) { | |
document.body.innerHTML = event.x + ', ' + event.y; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment