rename run_window -> app_window

This commit is contained in:
Dmitry Vasilev
2023-07-11 18:24:28 +03:00
parent 0435367544
commit fc086e8c49
12 changed files with 70 additions and 66 deletions

8
src/effects.js vendored
View File

@@ -9,10 +9,10 @@ import {
import {current_cursor_position} from './calltree.js'
import {exec, FILES_ROOT} from './index.js'
// Imports in the context of `run_window`, so global variables in loaded
// Imports in the context of `app_window`, so global variables in loaded
// modules refer to that window's context
const import_in_run_window = url => {
return new globalThis.run_window.Function('url', `
const import_in_app_window = url => {
return new globalThis.app_window.Function('url', `
return import(url)
`)(url)
}
@@ -23,7 +23,7 @@ const load_external_imports = async state => {
}
const urls = state.loading_external_imports_state.external_imports
const results = await Promise.allSettled(
urls.map(u => import_in_run_window(
urls.map(u => import_in_app_window(
/^\w+:\/\//.test(u)
? // starts with protocol, import as is
u