|
|
@ -46,20 +46,22 @@ export abstract class App { |
|
|
|
requestAnimationFrame(() => { |
|
|
|
this.log(`${this.appName}.initializing`); |
|
|
|
|
|
|
|
this.onInitialize?.(); |
|
|
|
this.bind(); |
|
|
|
try { |
|
|
|
this.onInitialize?.(); |
|
|
|
this.bind(); |
|
|
|
|
|
|
|
if (this.onMessageReceived != null) { |
|
|
|
window.addEventListener('message', this.onMessageReceived.bind(this)); |
|
|
|
} |
|
|
|
|
|
|
|
this.sendCommand(WebviewReadyCommandType, undefined); |
|
|
|
if (this.onMessageReceived != null) { |
|
|
|
window.addEventListener('message', this.onMessageReceived.bind(this)); |
|
|
|
} |
|
|
|
|
|
|
|
this.onInitialized?.(); |
|
|
|
this.sendCommand(WebviewReadyCommandType, undefined); |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
document.body.classList.remove('preload'); |
|
|
|
}, 500); |
|
|
|
this.onInitialized?.(); |
|
|
|
} finally { |
|
|
|
setTimeout(() => { |
|
|
|
document.body.classList.remove('preload'); |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|