Skip to main content

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);

Metadata

Release files for Html2js 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Html2js 1.4
File Size Uploaded
Html2js-1.4.tar.gz 2.4 kB Details

Release files / Html2js-1.4.tar.gz

Download URL Html2js-1.4.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e100dd8c8153a3fd8bbb5ede757de1094fdb99fe8e869d1614b2a5cf20a1023f
BLAKE2b-256 checksum
How to use checksums
cb0abe0289f607cb7bc3bc403f509d26ed788349d5ff808172cfde58a1243b96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.4 This release

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page