Wrapper for transcrypt transpiler for most common html5 functions like cookies, dom, buttons, canvas
Project description
TranscryptFrame
This is a suggestion for a transcrypt framework which offers convenient solutions or wrappers around common functions. Originally created by Andreas Bunkahle 2018
Install it with:
pip install TranscryptFrame
You can import this library with import TranscryptFrame as tf
and use it in your Python/Transcrypt scripts like this
myElement = tf.doc_id(“intro”) tf.doc_id(“demo”).innerHTML = “The text from the intro paragraph is “ + myElement.innerHTML
or even shorter: myElement = tf.S(“#intro”, “htm”) tf.S(“#demo”).innerHTML = “The text from the intro paragraph is “ + myElement
You can also have jQuery-like function calls like
tf.S(“#demo”).innerHTML = “<p>New paragraph</p>” instead of $(“#demo”).html(“<p>New paragraph</p>”) in Javascript or document.getElementById(“demo”).innerHTML = “<p>New paragraph</p>” in Transcrypt
or new_var = tf.S(“#demo”, “htm”) instead of new_var = $(“#demo”).html() or new_var = document.getElementById(“demo”).innerHTML
Examples
There are several examples for running the library in https://github.com/bunkahle/Transcrypt-Examples/tree/master/dom
You find a tutorial for it at: https://github.com/bunkahle/Transcrypt-Examples/blob/master/dom/changing_texts.rst
Requirements
The code currently only runs under Python 3 due to the fact that Transcrypt is only available for Python 3. Of course it relies on Transcrypt for running.
License
GNU GPL v3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file TranscryptFrame-1.0.zip
.
File metadata
- Download URL: TranscryptFrame-1.0.zip
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccc2535b5b210692fbd5a47c8b5f7073fbf05b4559b574bd01785013a79e6ec4 |
|
MD5 | f337746f3284c123d6ad55b9214c0cbd |
|
BLAKE2b-256 | 82775d03649d8646ae0e0e360310d727038354a24d3cbb1211f8261f11765996 |