wrap runPython in async (#1212)

This commit is contained in:
Madhur Tandon
2023-02-21 20:35:19 +00:00
committed by GitHub
parent 11c79a5344
commit e2c2459290
14 changed files with 158 additions and 42 deletions

View File

@@ -26,8 +26,8 @@ function createWidget(interpreter: Interpreter, name: string, code: string, klas
this.shadow.appendChild(this.wrapper);
}
connectedCallback() {
interpreter.runButDontRaise(this.code);
async connectedCallback() {
await interpreter.runButDontRaise(this.code);
this.proxyClass = interpreter.globals.get(this.klass);
this.proxy = this.proxyClass(this);
this.proxy.connect();