For example, we could have jQuery referenced as part of our project, however, we only want native DOM events.
<script src="jquery.js"></script> <script src="rx.lite.js"></script>
We can do this by setting the
Rx.config.useNativeEvents flag to
Rx.config.useNativeEvents = true; Rx.Observable.fromEvent(document, 'mousemove') .subscribe(e => console.log('ClientX: %d, ClientY: %d', e.clientX, e.clientY));