Created
March 9, 2019 10:39
-
-
Save ududsha/5780ce090d578668695bed870dc3f79f to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/xuroyujoja
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> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <button>Click Me</button> | |
| <script src="https://unpkg.com/@reactivex/rxjs@5.0.3/dist/global/Rx.js"></script> | |
| <script id="jsbin-javascript"> | |
| var button = document.querySelector('button'); | |
| // button.addEventListener('click', (event) => {console.log("clicked");}); | |
| Rx.Observable.fromEvent(button, 'click') | |
| .throttleTime(1000) | |
| .subscribe(event => { | |
| console.log("click"); | |
| }); | |
| </script> | |
| <script id="jsbin-source-javascript" type="text/javascript">var button = document.querySelector('button'); | |
| // button.addEventListener('click', (event) => {console.log("clicked");}); | |
| Rx.Observable.fromEvent(button, 'click') | |
| .throttleTime(1000) | |
| .subscribe(event => { | |
| console.log("click"); | |
| });</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 button = document.querySelector('button'); | |
| // button.addEventListener('click', (event) => {console.log("clicked");}); | |
| Rx.Observable.fromEvent(button, 'click') | |
| .throttleTime(1000) | |
| .subscribe(event => { | |
| console.log("click"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment