diff options
author | Tor Lillqvist <tml@collabora.com> | 2023-01-04 10:59:09 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2023-01-05 20:04:14 +0200 |
commit | 28b3d5846c58a97ccd7412d2e9e022fb1a9a706e (patch) | |
tree | 4717ad48271119f71cfc92d7c15cee0f0127ac64 | |
parent | Fix error in conversion from microseconds to whole milliseconds (diff) | |
download | online-28b3d5846c58a97ccd7412d2e9e022fb1a9a706e.tar.gz online-28b3d5846c58a97ccd7412d2e9e022fb1a9a706e.zip |
Don't pointlessly assign global.socket = app.socket
Note that the code changed is inside an anonymous function that is
called with one argument: window, for the function parameter called
global. Thus the assignment that this change removes sets
window.socket.
The window.socket variable is not used by code later, so this change
can be this minimal.
The window.socket variable has earlier been set to the WebSocket
object used to communicate with the COOL server. Let's keep it for
that purpose. app.socket is the app.definitions.Socket object. Even
though JavaScript is not type-safe, it is very confusing to use the
same variable for completely different object types at different
stages in the code execution. I am working on some new code that will
want to access the WebSocket object also later.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I6273a6d6acee3fa46ab9fedc5742ae44c8bfa567
-rw-r--r-- | browser/src/main.js | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/browser/src/main.js b/browser/src/main.js index 4e0a68c76e..c55222f4bf 100644 --- a/browser/src/main.js +++ b/browser/src/main.js @@ -74,7 +74,6 @@ L.Map.THIS = map; map.loadDocument(global.socket); -global.socket = app.socket; window.addEventListener('beforeunload', function () { if (map && app.socket) { if (app.socket.setUnloading) |