Search code examples
google-chrometranscrypt

Is transcrypt supposed to run from the local filesystem?


I've installed Transcrypt, compiled the Hello Solar System demo, and run it as instructed using the python web server.

However, I was also able to run the hello.html file directly from Chrome on Windows 10 ... once. Subsequently it refuses to run - the buttons appear but clicking them does not update the text.

------- EDIT ---------

Thanks - CORS is the problem - the browser must connect to a web server, not a file on the local filesystem.


Solution

  • You've probably run into a security policy of Chrome called CORS. Start a webserver from the directory where your html file is, using python -m http.server, and browse to localhost:8000. In your browser window, click on the html file and things should work.