Check for a global EventSource before deciding what to use. (#389)
Check for a global EventSource before deciding what to use. (#389)

* Check for a global EventSource before deciding what to use.

This approach gives you the flexibility to inject polyfills in other environments like react-native.

* Only define properties if the event source instance exists.

stellar/js-stellar-sdk,stellar/js-stellar-lib,stellar/js-stellar-sdk,stellar/js-stellar-sdk,stellar/js-stellar-lib