react-native/Libraries/Network
Connor McEwen b8ff6212f8 bind this in onreadystatechange call
Summary:
I ran into this problem that `this` is undefined in `onreadystatechange` function calls while using this github api library: https://github.com/michael/github/blob/master/github.js#L72

It seems that in the browser, the `onreadystatechange` function expects `this` to be bound. This example on the xhr spec website can be seen using `this` similarly: https://xhr.spec.whatwg.org/#the-getresponseheader()-method
Closes https://github.com/facebook/react-native/pull/5373

Reviewed By: svcscm

Differential Revision: D2838940

Pulled By: nicklockwood

fb-gh-sync-id: e42184887c7abb0af9c4358a5f33b8c97155624c
2016-01-18 08:55:35 -08:00
..
RCTNetwork.xcodeproj Added RCTDataRequestHandler 2015-10-19 09:07:06 -07:00
FormData.js FormData can append only string or object with uri 2016-01-12 03:25:33 -08:00
NetInfo.js Don't use arrow functions with Flow types to fix website generation 2015-12-09 14:56:40 -08:00
RCTDataRequestHandler.h Added RCTDataRequestHandler 2015-10-19 09:07:06 -07:00
RCTDataRequestHandler.m Fix retain cyles in RCTNetworkTask when used with RCTFileRequestHandler and RCTDataRequestHandler 2015-11-04 07:16:26 -08:00
RCTFileRequestHandler.h Added RCTFileRequestHandler 2015-10-13 08:14:28 -07:00
RCTFileRequestHandler.m Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
RCTHTTPRequestHandler.h Refactored networking logic out into RCTDownloadTask 2015-07-23 04:00:31 -08:00
RCTHTTPRequestHandler.m Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTNetInfo.h Rename RCTReachability to RCTNetInfo 2015-08-14 08:20:01 -08:00
RCTNetInfo.m Open source the Android NetInfo module 2015-12-02 11:52:22 -08:00
RCTNetworkTask.h Fix retain cyles in RCTNetworkTask when used with RCTFileRequestHandler and RCTDataRequestHandler 2015-11-04 07:16:26 -08:00
RCTNetworkTask.m RTCImageStoreManager uses NSData instead of UIImage 2015-11-17 09:55:31 -08:00
RCTNetworking.android.js Implement XHR timeout for Android and IOS natively. 2016-01-18 08:10:59 -08:00
RCTNetworking.h Added RCTDataRequestHandler 2015-10-19 09:07:06 -07:00
RCTNetworking.ios.js ensure that RCTNetworking JS function names are consistent with android 2015-11-18 15:48:29 -08:00
RCTNetworking.m Implement XHR timeout for Android and IOS natively. 2016-01-18 08:10:59 -08:00
XMLHttpRequest.android.js Implement XHR timeout for Android and IOS natively. 2016-01-18 08:10:59 -08:00
XMLHttpRequest.ios.js Implement XHR timeout for Android and IOS natively. 2016-01-18 08:10:59 -08:00
XMLHttpRequestBase.js bind this in onreadystatechange call 2016-01-18 08:55:35 -08:00