-
Notifications
You must be signed in to change notification settings - Fork 22
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
WP-5258 Automatically use sockjs_client_wrapper if possible. #296
Conversation
RavenNumber of Findings: 0 |
noCredentials: noCredentials == true, | ||
// If the sockjs.js file wasn't detected, then we fallback to the original | ||
// SockJS Dart port. | ||
return SockJSPortWebSocket.connect(uri, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on spitting out a hint about using the new lib?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a note to the changelog, the source docs for WebSocket
, and the SockJS guide. I'd rather not log/print anything right now since I don't see us making the major jump anytime soon and in the meantime it's valid for consumers to not want to change anything since it still works.
5b4a2ee
to
a2e6d22
Compare
a2e6d22
to
750e1b0
Compare
QA +1
Merging into master. |
Changes
With the release of sockjs_client_wrapper, we want to use that library if possible because it is fully featured and supports all of the SockJS protocols (particularly xhr-polling). But, we can't just switch because it requires the addition of the
sockjs.js
library to the HTML page.The proposed solution here is to check for the existence of the
sockjs.js
script by checking forSockJS
on the window. If it's there, we'll automatically leverage the new package instead of the old Dart port. Otherwise, we'll fallback to the original behavior (i.e. nothing should change).Testing
Code Review
@Workiva/app-frameworks