client: ensure a proper init order for server-client communication
This commit is contained in:
parent
dc7ac2bcd3
commit
acf5f74ea2
3 changed files with 32 additions and 23 deletions
|
|
@ -13,18 +13,20 @@ function init() {
|
|||
|
||||
setTimeout(()=>{
|
||||
|
||||
ipc.init()
|
||||
ipc.init(()=>{
|
||||
|
||||
document.title = TITLE
|
||||
|
||||
ipc.send('open', {hotReload: backup.exists})
|
||||
document.title = TITLE
|
||||
|
||||
window.onunload = ()=>{
|
||||
ipc.send('close')
|
||||
}
|
||||
ipc.send('open', {hotReload: backup.exists})
|
||||
|
||||
backup.load()
|
||||
window.onunload = ()=>{
|
||||
ipc.send('close')
|
||||
}
|
||||
|
||||
backup.load()
|
||||
|
||||
})
|
||||
|
||||
}, 100)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue