4 ms·
I checked your example with solar system. Since it's calling directly document.getElementById, it would not be some valid Python code that I could run independe
by S4M 11y ago
I checked your example with solar system. Since it's calling directly document.getElementById, it would not be some valid Python code that I could run independently. Isn't that defeating the purpose of coding in Python first?
- kevincox 11y agoIt's still valid python code, the libraries are just different.
- JdeH 11y agoPurpose of Transcrypt is to be able to use Python in the JavaScript world. The call document.getElementById doesn't have meaning outside a browser. For non-gui debugging purposes module org.transcrypt.stubs.browser is present supporting the bare minimum. Of course someone could write a library supporting all kinds of DOM functions. But I don't think it would be very useful. The idea is to be able to do the whole web "chain" in Python. So CPython + a framework on the server, Transcrypt in the Browser (or, generally, JS client).