Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Ensure that websockets are shimmed before any Jupyter client code runs. #2070

Merged
merged 2 commits into from
Aug 28, 2018

Conversation

ojarjur
Copy link
Contributor

@ojarjur ojarjur commented Aug 28, 2018

This fixes #2069

@@ -88,7 +88,9 @@
window.datalab = {};

$("#appBar").load("<%baseUrl%>static/appbar.html", function() {
requirejs(['edit/js/main.min']);
requirejs(['websocket'], (websocket) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we add 'edit/js/main.min' to the list of dependencies of the websocket module? Is there a scenario where that doesn't work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the opposite sequence of what we need.

The websocket module needs to be loaded first, so it would have to be a dependency of the various main.min modules, and we do not control the code for those (they are bundled with Jupyter).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. LGTM then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race condition when setting up a shim for socket.io
2 participants