mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 03:05:38 -05:00
Merge pull request #192 from cclauss/patch-2
interpreter.ts: Typo functions
This commit is contained in:
@@ -85,7 +85,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2 class="text-2xl font-bold text-blue-600"><a href="./panel.html" target=”_blank”>Simple Panel Demo</a></h2>
|
<h2 class="text-2xl font-bold text-blue-600"><a href="./panel.html" target=”_blank”>Simple Panel Demo</a></h2>
|
||||||
<p>Simple demo showing Panel widgets interating with parts of the page
|
<p>Simple demo showing Panel widgets interacting with parts of the page
|
||||||
|
|
||||||
WARNING: This examples takes a little longer to load. So be patient :)
|
WARNING: This examples takes a little longer to load. So be patient :)
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export class PyBox extends HTMLElement {
|
|||||||
while (this.childNodes.length > 0) {
|
while (this.childNodes.length > 0) {
|
||||||
console.log(this.firstChild);
|
console.log(this.firstChild);
|
||||||
if (this.firstChild.nodeName == 'PY-REPL') {
|
if (this.firstChild.nodeName == 'PY-REPL') {
|
||||||
// in this case we need to remove the child and craete a new one from scratch
|
// in this case we need to remove the child and create a new one from scratch
|
||||||
const replDiv = document.createElement('div');
|
const replDiv = document.createElement('div');
|
||||||
// we need to put the new repl inside a div so that if the repl has auto-generate true
|
// we need to put the new repl inside a div so that if the repl has auto-generate true
|
||||||
// it can replicate itself inside that constrained div
|
// it can replicate itself inside that constrained div
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ async function initHandlers() {
|
|||||||
source = `Element("${el.id}").element.onclick = ${handlerCode}`;
|
source = `Element("${el.id}").element.onclick = ${handlerCode}`;
|
||||||
output = await pyodide.runPythonAsync(source);
|
output = await pyodide.runPythonAsync(source);
|
||||||
|
|
||||||
// TODO: Should we actually map handlers in JS instaed of Python?
|
// TODO: Should we actually map handlers in JS instead of Python?
|
||||||
// el.onclick = (evt: any) => {
|
// el.onclick = (evt: any) => {
|
||||||
// console.log("click");
|
// console.log("click");
|
||||||
// new Promise((resolve, reject) => {
|
// new Promise((resolve, reject) => {
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ const loadInterpreter = async function (): Promise<any> {
|
|||||||
stderr: console.log,
|
stderr: console.log,
|
||||||
});
|
});
|
||||||
|
|
||||||
// now that we loaded, add additional convenience fuctions
|
// now that we loaded, add additional convenience functions
|
||||||
console.log('loading micropip');
|
console.log('loading micropip');
|
||||||
await pyodide.loadPackage('micropip');
|
await pyodide.loadPackage('micropip');
|
||||||
console.log('loading pyscript module');
|
console.log('loading pyscript module');
|
||||||
|
|||||||
Reference in New Issue
Block a user