forked from Blendman974/faceclaw
Fix a race condition that sometimes caused apps to skip their first paint after launch
This commit is contained in:
1 parent
ccd28b7ac9
commit
7ebf921299
9 files changed
+74
No files matched your search
@@ -118,6 +118,12 @@ function post(message: WorkerAppReply): void {
|
||||
global.postMessage(message);
|
||||
}
|
||||
|
||||
// The host queues messages until this arrives: posts to a worker whose bundle
|
||||
// is still evaluating can be silently dropped (see WorkerAppHost). Top-level
|
||||
// evaluation is synchronous, so the handler below is installed before any
|
||||
// queued message can be delivered.
|
||||
post({ type: "worker-ready" });
|
||||
|
||||
global.onmessage = (event: { data: WorkerAppMessage }) => {
|
||||
const message = event.data;
|
||||
switch (message.type) {
|
||||
|
||||
Reference in new issue
Block a user