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
Add support for ssl configuration to addListener #2243
Conversation
Hey - looks like you forgot to add a T:* label - could you please add one? |
This seems like a good time to switch to lumping all the configuration options for addListener into a single config object (i.e. something like If you don't want to deal with that now, the sslConfiguration parameter should come before the callback, as parameters after a callback are hard to read when using an inline function expression that may result in the final parameters being many many lines away from the function call. To make this a non-breaking change the implementation would check if the fifth argument is a function, and if so treat it as the callback rather than the sslConfiguration (this is kinda awkward but is a very common thing for JS libraries to do). |
Yeah. I had the same doubt as you about the API. Creating a new function with a single config object seems like a good approach and then we can deprecate the other method. |
@tgoyne This API does not appear to be used, and looking at the code I'm not sure it even works: https://github.com/realm/realm-js/blob/master/docs/sync.js#L141 Can it be safely removed? |
Yes, that function is used and works. There's tests for it in realm-js-private. |
Add public API support controlling SSL to the global notifier.