Skip to content

Commit 6c5ce7c

Browse files
authored
Merge pull request #48 from kcl-lang/chore-update-wasm-loading-text
chore: update wasm loading text
2 parents df32bb5 + 5356045 commit 6c5ce7c

File tree

2 files changed

+5
-58
lines changed

2 files changed

+5
-58
lines changed

.github/workflows/deploy.yaml

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/js/editor/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ import './share';
99
import './codemirror-kcl';
1010
import { load, invokeKCLRun, invokeKCLFmt } from "../module";
1111

12-
const response = await fetch("kcl.wasm");
13-
const wasm = await response.arrayBuffer();
14-
const inst = await load({ data: wasm });
1512
const source = document.getElementById('source');
1613
const run = document.getElementById('run');
1714
const outputContainer = document.getElementById('output-container');
@@ -27,6 +24,11 @@ const editor = CodeMirror.fromTextArea(source, {
2724
lineWrapping: true,
2825
smartIndent: true,
2926
});
27+
editor.setValue("Loading KCL WASM module...");
28+
29+
const response = await fetch("kcl.wasm");
30+
const wasm = await response.arrayBuffer();
31+
const inst = await load({ data: wasm });
3032

3133
class Mutex {
3234
constructor() {

0 commit comments

Comments
 (0)