1
0
mirror of https://github.com/pyscript/pyscript.git synced 2022-05-01 19:47:48 +03:00

add new initialized runtime to global runtimes in store

This commit is contained in:
Fabio Pliger
2022-03-09 11:55:34 -06:00
parent b00180a123
commit 9554f5b1fd

View File

@@ -6,16 +6,19 @@ import { defaultKeymap } from "@codemirror/commands";
import { oneDarkTheme } from "@codemirror/theme-one-dark"; import { oneDarkTheme } from "@codemirror/theme-one-dark";
import { pyodideLoaded } from '../stores'; import { pyodideLoaded, loadedEnvironments } from '../stores';
import { addClasses } from '../utils'; import { addClasses } from '../utils';
import { debug } from "svelte/internal"; import { debug } from "svelte/internal";
// Premise used to connect to the first available pyodide interpreter // Premise used to connect to the first available pyodide interpreter
let pyodideReadyPromise; let pyodideReadyPromise;
let environments;
pyodideLoaded.subscribe(value => { pyodideLoaded.subscribe(value => {
pyodideReadyPromise = value; pyodideReadyPromise = value;
}); });
loadedEnvironments.subscribe(value => {
environments = value;
});
function createCmdHandler(el){ function createCmdHandler(el){
// Creates a codemirror cmd handler that calls the el.evaluate when an event // Creates a codemirror cmd handler that calls the el.evaluate when an event