Examples for transcrypt
Clone or download
Latest commit 87408a8 Mar 9, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
alerts Add files via upload Mar 2, 2018
canvas Add files via upload Mar 7, 2018
cookies Delete test Feb 18, 2018
document_write Delete test Feb 18, 2018
dom Add files via upload Mar 7, 2018
files Add files via upload Feb 22, 2018
games Add files via upload Feb 26, 2018
hello Delete test Feb 18, 2018
jquery Add files via upload Mar 6, 2018
location Add files via upload Feb 18, 2018
navigator Delete test Feb 18, 2018
screen Add files via upload Feb 6, 2018
sounds Add files via upload Feb 7, 2018
tetris Delete dess.txt Feb 27, 2018
turtle Delete test Feb 26, 2018
user-interface Add files via upload Mar 9, 2018
window Add files via upload Feb 17, 2018
README.md Update README.md Mar 2, 2018



Examples for transcrypt

You need to have Python 3.6 installed.

Install Transcrypt with pip install transcrypt

Create a directory like hello with two files named hello.py and hello.html

Run transcrypt to compile the example file hello.py to Javascript files: transcrypt hello.py

You get a extra directory named __javascript__ where the javascript files are located.

Start hello.html in your browser and test the code.

If you like to see a kind of tutorial for beginners in Transcrypt go to

  1. Alerts, Prompts and Confirmations:


2a. Inserting text into DOM elements in HTML5:


2b. Document properties:


2c. Changing texts with querySelector(All), getElementById, getElementsByClassName and getElementsByTagName


  1. Programming Cookies:


  1. Write documents into the browser ouput with document.write:


  1. Navigator properties:


  1. Location: Load, reload, replace files into the browser history:


Basics on game programming with DOM/HTML5: