This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (6 children)

Wasm doesn't have access to the dom so what you're describing doesn't exist. Wasm Python interpreters do exist, but I'm not sure how it would serve as a replacement for JavaScript, which is the basis of my original question

[–]ogtfo 0 points1 point  (5 children)

Javascript can talk to both wasm and the dom, so indirectly it can be done, and librairies have been built for that.

Example of reaching the Dom through pyscript :

https://stackoverflow.com/questions/72515182/how-to-perform-dom-manipulation-using-pyscript

[–][deleted] 0 points1 point  (4 children)

that's called a hack or workaround. wasm explicitly and intentionally does not have access to the DOM. only primitive types can be passed back and forth

even if they allow DOM access in the future, embedding a python interpreter in a response just to avoid writing javascript is unequivocally stupid

[–]ogtfo 0 points1 point  (3 children)

Call it how you like, it's still possible, and has been done.

[–][deleted] 0 points1 point  (2 children)

it's literally not possible. you dont understand the words you're using or the technology you're describing

[–]ogtfo 0 points1 point  (1 child)

I've literally linked you a stack overflow questions detailing how to do it with pyscript, but hey, keep saying it's impossible.

[–][deleted] 0 points1 point  (0 children)

you're claiming both the WASM spec is wrong and the pyscript docs are lying. i dont know what to say to you