The RxJS-DOM Method

Learn to use the RxJS-DOM library to handle JSONP requests.

So far we’ve used RxJS operators included in rx.all.js, which is a file containing all the extensions of RxJS, but it’s usually worth also checking out operators that come with other RxJS-based libraries. In our case, we’ll look at RxJS-DOM.

The RxJS-DOM library is an external library that, among others, contains an operator to handle JSONP requests: jsonpRequest. That saves us some code and keeps us from using nasty global functions:

Get hands-on with 1200+ tech skills courses.