Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9554f5b

Browse files
committed
add new initialized runtime to global runtimes in store
1 parent b00180a commit 9554f5b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pyscriptjs/src/components/pyscript.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@ import { defaultKeymap } from "@codemirror/commands";
66
import { oneDarkTheme } from "@codemirror/theme-one-dark";
77

88

9-
import { pyodideLoaded } from '../stores';
9+
import { pyodideLoaded, loadedEnvironments } from '../stores';
1010
import { addClasses } from '../utils';
1111
import { debug } from "svelte/internal";
1212

1313
// Premise used to connect to the first available pyodide interpreter
1414
let pyodideReadyPromise;
15-
15+
let environments;
1616
pyodideLoaded.subscribe(value => {
1717
pyodideReadyPromise = value;
1818
});
19+
loadedEnvironments.subscribe(value => {
20+
environments = value;
21+
});
1922

2023
function createCmdHandler(el){
2124
// Creates a codemirror cmd handler that calls the el.evaluate when an event

0 commit comments

Comments
 (0)