async calls WIP

This commit is contained in:
Dmitry Vasilev
2022-10-25 02:29:59 +08:00
parent 7c9c74988d
commit 1d1215b718
5 changed files with 98 additions and 12 deletions

View File

@@ -46,7 +46,10 @@ export const init = (container) => {
})
read_modules().then(initial_state => {
state = get_initial_state(initial_state)
state = get_initial_state({
...initial_state,
on_async_call: (...args) => exec('on_async_call', ...args)
})
// Expose state for debugging
globalThis.__state = state
ui = new UI(container, state)