mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
open window to run code
This commit is contained in:
@@ -10,6 +10,13 @@ const EXAMPLE = `const fib = n =>
|
||||
: fib(n - 1) + fib(n - 2)
|
||||
fib(6)`
|
||||
|
||||
export const open_run_window = () => {
|
||||
if(globalThis.run_window != null) {
|
||||
globalThis.run_window.close()
|
||||
}
|
||||
globalThis.run_window = open('about:blank')
|
||||
}
|
||||
|
||||
const read_modules = async () => {
|
||||
const default_module = {'': localStorage.code || EXAMPLE}
|
||||
const current = {
|
||||
|
||||
Reference in New Issue
Block a user