summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2019-11-12 14:49:19 -0400
committerHenry Castro <hcastro@collabora.com>2019-11-15 15:49:52 +0100
commit3e2ec0854dd730831db1d7a2bd33e397459fc7f1 (patch)
treed7f7f05797ceaf398aae0d06400ce1810ebf30b9
parentd93d9dc59b2ef4e48b7d768a3df8ef153d4e51e2 (diff)
loleaflet: add missing parameters when early websocket connectionlibreoffice-6-4-branch-point
Add some missing parameters when the "websocket" is connected after loleaflet.html while "bundle.js" is downloading and ready to execute. Change-Id: I36995a3c82ce17fa5a81923e8d6d785f0c1c7742 Reviewed-on: https://gerrit.libreoffice.org/82546 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--loleaflet/js/global.js24
1 files changed, 19 insertions, 5 deletions
diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index ffc0a1d4b..e44d613a6 100644
--- a/loleaflet/js/global.js
+++ b/loleaflet/js/global.js
@@ -135,18 +135,32 @@
}
}
+ var lang = global.getParameterByName('lang');
global.queueMsg = [];
if (window.ThisIsTheiOSApp)
- window.LANG = window.getParameterByName('lang');
+ window.LANG = lang;
if (global.socket && global.socket.readyState !== 3) {
global.socket.onopen = function () {
if (global.socket.readyState === 1) {
var ProtocolVersionNumber = '0.1';
+ var timestamp = global.getParameterByName('timestamp');
+ var msg = 'load url=' + encodeURIComponent(global.docURL);
+
global.socket.send('loolclient ' + ProtocolVersionNumber);
- if (window.ThisIsTheiOSApp)
- global.socket.send('load url=' + encodeURIComponent(global.docURL) + ' lang=' + window.LANG);
- else
- global.socket.send('load url=' + encodeURIComponent(global.docURL));
+
+ if (window.ThisIsTheiOSApp) {
+ msg += ' lang=' + window.LANG;
+ } else {
+
+ if (timestamp) {
+ msg += ' timestamp=' + timestamp;
+ }
+ if (lang) {
+ msg += ' lang=' + lang;
+ }
+ // renderingOptions?
+ }
+ global.socket.send(msg);
}
}