-
Notifications
You must be signed in to change notification settings - Fork 24.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix WebSocket compatibility with event-target-shim ^1.0.5 #7261
Conversation
By analyzing the blame information on this pull request, we identified @satya164 and @lindskogen to be potential reviewers. |
Summary:- Get rid of no longer necessary WebSocket.js v WebSocketBase.js split - Use `EventTarget(list, of, events)` as base class to auto-generate `oneventname` getters/setters that get invoked along with other event handlers - Type annotation `any` considered harmful, especially when we can easily spell out the actual type - Throw in some `const` goodness for free **Test Plan:** Launch UIExplorer example app, supplied `websocket_test_server` script, and try different combinations of sending and receiving text and binary data on both iOS and Android. Closes #6889 Differential Revision: D3184835 Pulled By: mkonicek fb-gh-sync-id: f21707f4e97aa5a79847f5157e0a9f132a1a01cd fbshipit-source-id: f21707f4e97aa5a79847f5157e0a9f132a1a01cd
A few tests fail but they look unrelated. |
@facebook-github-bot ship |
Nah, that's not unrelated. Stupid mock... Let me fix. |
(It's just the test mock, so the actual code is fine.) |
@philikon updated the pull request. |
@facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
Summary: event-target-shim versions before 1.1.0 do not support taking an array for `EventTarget`. react-native requires `^1.0.5`, so this fixes compatibility with those earlier versions. **Test Plan:** ran WebSocket UIExplorer example with earlier version of event-target-shim. Closes facebook#7261 Differential Revision: D3230881 Pulled By: martinbigio fb-gh-sync-id: 6a22d58841a4b401a200fece64d13a70043fb09a fbshipit-source-id: 6a22d58841a4b401a200fece64d13a70043fb09a
Summary: event-target-shim versions before 1.1.0 do not support taking an array for `EventTarget`. react-native requires `^1.0.5`, so this fixes compatibility with those earlier versions. **Test Plan:** ran WebSocket UIExplorer example with earlier version of event-target-shim. Closes facebook#7261 Differential Revision: D3230881 Pulled By: martinbigio fb-gh-sync-id: 6a22d58841a4b401a200fece64d13a70043fb09a fbshipit-source-id: 6a22d58841a4b401a200fece64d13a70043fb09a
Summary: event-target-shim versions before 1.1.0 do not support taking an array for `EventTarget`. react-native requires `^1.0.5`, so this fixes compatibility with those earlier versions. **Test Plan:** ran WebSocket UIExplorer example with earlier version of event-target-shim. Closes facebook#7261 Differential Revision: D3230881 Pulled By: martinbigio fb-gh-sync-id: 6a22d58841a4b401a200fece64d13a70043fb09a fbshipit-source-id: 6a22d58841a4b401a200fece64d13a70043fb09a
event-target-shim versions before 1.1.0 do not support taking an array for
EventTarget
. react-native requires^1.0.5
, so this fixes compatibility with those earlier versions.Test Plan: ran WebSocket UIExplorer example with earlier version of event-target-shim.