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 htmljson
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.1.tar.gz
(2.4 kB
view details)
File details
Details for the file html2js-1.1.tar.gz
.
File metadata
- Download URL: html2js-1.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa76f07e47c2dd970ff615f4975f71be747b1b9a84e3010b492e23254354d9ea |
|
MD5 | 95b33a2ddd113e57c2e5449830498efa |
|
BLAKE2b-256 | 1019ce8e52363181a2cefda7435e242e510041a2ae6c7f1116e1cd05686f0246 |