web-apps/apps/common/main/lib/util/desktopinit.js
2021-12-14 20:37:04 +03:00

23 lines
678 B
JavaScript

if ( window.AscDesktopEditor ) {
window.desktop = window.AscDesktopEditor;
desktop.features = {};
window.native_message_cmd = [];
window.on_native_message = function (cmd, param) {
if ( /window:features/.test(cmd) ) {
var obj = JSON.parse(param);
if ( obj.singlewindow !== undefined ) {
desktop.features.singlewindow = obj.singlewindow;
}
} else
window.native_message_cmd[cmd] = param;
}
if ( !!window.RendererProcessVariable ) {
desktop.theme = window.RendererProcessVariable.theme;
}
window.desktop.execCommand('webapps:entry', window.uitype || '');
}