Skip to main content

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.4.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file Html2js-1.4.tar.gz.

File metadata

  • Download URL: Html2js-1.4.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

Hashes for Html2js-1.4.tar.gz
Algorithm Hash digest
SHA256 e100dd8c8153a3fd8bbb5ede757de1094fdb99fe8e869d1614b2a5cf20a1023f
MD5 2309e01f043ce2af96c11aa7a4bdceab
BLAKE2b-256 cb0abe0289f607cb7bc3bc403f509d26ed788349d5ff808172cfde58a1243b96

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page