mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 10:47:35 -05:00
PyScript Core Documentation (#1560)
This commit is contained in:
committed by
GitHub
parent
bf6470c046
commit
9121071ba3
@@ -57,15 +57,4 @@ img = document.createElement("img")
|
||||
img.style.transform = "scale(.5)"
|
||||
img.src = "data:image/png;base64," + base64.b64encode(buf.read()).decode("UTF-8")
|
||||
|
||||
# document.body.append(img) fails for some reason I don't understand
|
||||
# same would be for document.querySelector("#image").append(img)
|
||||
# those would work in any JS counterpart though ... but for demo sake:
|
||||
document.querySelector("#image").innerHTML = img.outerHTML
|
||||
|
||||
# about pyodide issue
|
||||
print(xworker.window.Array(1, 2)) # this works
|
||||
xworker.window.console.log(1, 2) # this works too
|
||||
# xworker.window.console.log(xworker.window.Array(1, 2)) # this doesn't
|
||||
# xworker.window.console.log([1, 2]) # also this doesn't
|
||||
|
||||
# xworker.window.console.log(to_js({})) # this doesn't neither
|
||||
document.body.append(img)
|
||||
|
||||
Reference in New Issue
Block a user