mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 21:14:28 -08:00
rename run_window -> app_window
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
exec,
|
||||
get_state,
|
||||
open_directory,
|
||||
reload_run_window,
|
||||
reload_app_window,
|
||||
close_directory,
|
||||
} from '../index.js'
|
||||
|
||||
@@ -28,7 +28,7 @@ export class Files {
|
||||
change_html_file(e) {
|
||||
const html_file = e.target.value
|
||||
exec('change_html_file', html_file)
|
||||
reload_run_window(get_state())
|
||||
reload_app_window(get_state())
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {exec, get_state, open_run_window} from '../index.js'
|
||||
import {exec, get_state, open_app_window} from '../index.js'
|
||||
import {Editor} from './editor.js'
|
||||
import {Files} from './files.js'
|
||||
import {CallTree} from './calltree.js'
|
||||
@@ -8,7 +8,7 @@ import {el} from './domutils.js'
|
||||
|
||||
export class UI {
|
||||
constructor(container, state){
|
||||
this.open_run_window = this.open_run_window.bind(this)
|
||||
this.open_app_window = this.open_app_window.bind(this)
|
||||
|
||||
this.files = new Files(this)
|
||||
|
||||
@@ -90,9 +90,9 @@ export class UI {
|
||||
el('a', {
|
||||
'class': 'statusbar_action',
|
||||
href: 'javascript: void(0)',
|
||||
click: this.open_run_window,
|
||||
click: this.open_app_window,
|
||||
},
|
||||
'(Re)open run window (F7)'
|
||||
'(Re)open app window (F7)'
|
||||
),
|
||||
|
||||
this.options = el('div', 'options',
|
||||
@@ -160,7 +160,7 @@ export class UI {
|
||||
}
|
||||
|
||||
if(e.key == 'F7'){
|
||||
this.open_run_window()
|
||||
this.open_app_window()
|
||||
}
|
||||
|
||||
if(e.key == 'F8'){
|
||||
@@ -210,8 +210,8 @@ export class UI {
|
||||
}
|
||||
}
|
||||
|
||||
open_run_window() {
|
||||
open_run_window(get_state())
|
||||
open_app_window() {
|
||||
open_app_window(get_state())
|
||||
}
|
||||
|
||||
render_debugger_loading(state) {
|
||||
|
||||
@@ -8,27 +8,27 @@ import {el, stringify, scrollIntoViewIfNeeded} from './domutils.js'
|
||||
import {with_code_execution} from '../index.js'
|
||||
|
||||
|
||||
// We test both for Object and globalThis.run_window.Object because objects may
|
||||
// come both from run_window and current window (where they are created in
|
||||
// We test both for Object and globalThis.app_window.Object because objects may
|
||||
// come both from app_window and current window (where they are created in
|
||||
// metacircular interpreter
|
||||
const has_custom_toString = object =>
|
||||
object.toString != null
|
||||
&& object.toString != globalThis.run_window.Object.prototype.toString
|
||||
&& object.toString != globalThis.app_window.Object.prototype.toString
|
||||
&& object.toString != Object.prototype.toString
|
||||
|
||||
const isError = object =>
|
||||
object instanceof Error
|
||||
||
|
||||
object instanceof globalThis.run_window.Error
|
||||
object instanceof globalThis.app_window.Error
|
||||
|
||||
const isPromise = object =>
|
||||
object instanceof globalThis.run_window.Promise
|
||||
object instanceof globalThis.app_window.Promise
|
||||
|
||||
// Override behaviour for Date, becase Date has toJSON defined
|
||||
const isDate = object =>
|
||||
object instanceof globalThis.run_window.Date
|
||||
object instanceof globalThis.app_window.Date
|
||||
||
|
||||
object instanceof globalThis.run_window.Date.__original
|
||||
object instanceof globalThis.app_window.Date.__original
|
||||
|
||||
const toJSON_safe = object => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user