client: init timeout should not be needed anymore; preload js modules asap if supported
This commit is contained in:
parent
8737385a0e
commit
58c1fc3c32
2 changed files with 12 additions and 12 deletions
|
|
@ -11,24 +11,20 @@ uiLoading(locales('loading_server'))
|
|||
|
||||
function init() {
|
||||
|
||||
setTimeout(()=>{
|
||||
|
||||
ipc.init(()=>{
|
||||
ipc.init(()=>{
|
||||
|
||||
|
||||
document.title = TITLE
|
||||
document.title = TITLE
|
||||
|
||||
ipc.send('open', {hotReload: backup.exists})
|
||||
ipc.send('open', {hotReload: backup.exists})
|
||||
|
||||
window.onunload = ()=>{
|
||||
ipc.send('close')
|
||||
}
|
||||
window.onunload = ()=>{
|
||||
ipc.send('close')
|
||||
}
|
||||
|
||||
backup.load()
|
||||
backup.load()
|
||||
|
||||
})
|
||||
|
||||
}, 100)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@
|
|||
<link rel="shortcut icon" href="/assets/favicon.png"/>
|
||||
<script src="/client/ace/ace.js"></script>
|
||||
<script type="module" defer src="/client/index.js"></script>
|
||||
<link rel="modulepreload" href="/client/callbacks.js" />
|
||||
<link rel="modulepreload" href="/client/context-menu.js" />
|
||||
<link rel="modulepreload" href="/client/remote-control.js" />
|
||||
<link rel="modulepreload" href="/client/ui-keyboard.js" />
|
||||
</head>
|
||||
|
||||
<body class="editor-disabled" spellcheck="false">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue