refactor globals

This commit is contained in:
Dmitry Vasilev
2023-06-15 23:55:06 +03:00
parent fdbe01249d
commit 2f5db0452c
7 changed files with 75 additions and 40 deletions

View File

@@ -67,7 +67,10 @@ export const open_run_window = state => {
// event fired. TODO: better register SW explicitly and don't rely on
// already registered SW?
const onload = () => {
exec('open_run_window')
exec(
'open_run_window',
new Set(Object.getOwnPropertyNames(globalThis.run_window))
)
}
const add_load_handler = () => {
@@ -170,7 +173,10 @@ export const init = (container, _COMMANDS) => {
render_initial_state(ui, state)
open_run_iframe(state, () => {
exec('open_run_window')
exec(
'open_run_window',
new Set(Object.getOwnPropertyNames(globalThis.run_window))
)
})
})
}