Examples for transcrypt
Clone or download
Latest commit 87408a8 Mar 9, 2018
Permalink
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

README.md

Transcrypt-Examples

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:

https://github.com/bunkahle/Transcrypt-Examples/blob/master/alerts/alerts.rst

2a. Inserting text into DOM elements in HTML5:

https://github.com/bunkahle/Transcrypt-Examples/blob/master/dom/insert_text.rst

2b. Document properties:

https://github.com/bunkahle/Transcrypt-Examples/blob/master/dom/document_properties.rst

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

https://github.com/bunkahle/Transcrypt-Examples/blob/master/dom/changing_texts.rst

  1. Programming Cookies:

https://github.com/bunkahle/Transcrypt-Examples/blob/master/cookies/cookies.rst

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

https://github.com/bunkahle/Transcrypt-Examples/blob/master/document_write/document_write.rst

  1. Navigator properties:

https://github.com/bunkahle/Transcrypt-Examples/blob/master/navigator/navigator.rst

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

https://github.com/bunkahle/Transcrypt-Examples/blob/master/location/location.rst

Basics on game programming with DOM/HTML5:

https://github.com/bunkahle/Transcrypt-Examples/blob/master/games/games.rst