mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 02:37:41 -05:00
committed by
GitHub
parent
37d4cb7c48
commit
264675d0c3
@@ -215,10 +215,11 @@ class PyScriptElement extends HTMLElement {
|
||||
async connectedCallback() {
|
||||
if (!this.executed) {
|
||||
this.executed = true;
|
||||
const { io, run } = await this._pyodide.promise;
|
||||
const { io, run, runAsync } = await this._pyodide.promise;
|
||||
const runner = this.hasAttribute("async") ? runAsync : run;
|
||||
this.srcCode = await fetchSource(this, io, !this.childElementCount);
|
||||
this.replaceChildren();
|
||||
run(this.srcCode);
|
||||
runner(this.srcCode);
|
||||
this.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user