No project description provided
Project description
Html2Js
Convert Html to equivalente javascript ( document.createElement , document.createTextNode , document.setAttribute , document.appendChild )
Usage :
Example
from Html2js import html2js
html = """<div style="margin-top:-20px; letter-spacing:3px;font-size:45px" class="sfbg">ISSAM</div>"""
print(html2js(html,root = "document.body"))
var itm_139927509068160 = document.createElement("div");
itm_139927509068160.setAttribute("style","margin-top:-20px; letter-spacing:3px;font-size:45px");
itm_139927509068160.classList.add("sfbg");
var itm_139927509052800 = document.createTextNode("ISSAM");
itm_139927509068160.appendChild(itm_139927509052800);
document.body.appendChild(itm_139927509068160);
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Html2js-1.3.tar.gz
(2.4 kB
view details)
File details
Details for the file Html2js-1.3.tar.gz
.
File metadata
- Download URL: Html2js-1.3.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64fd70d7da4d290e53b1fb0a3ed4b0d59d01dc9d10992b15b077aabbe69380c3 |
|
MD5 | 8deddf12b27db58a9e219e8aebccd987 |
|
BLAKE2b-256 | 06fdf5eb2120af03cfc9899e01d948439d261e0d8a16a879a3471a0d5cbe4d39 |