1.1.0 • Published 4 years ago
htm-chef v1.1.0
htm-chef
A tiny wrapper of htm and dom-chef for using JSX-like syntax to build DOM without transpile
Installation
Using <script>
tag with CDN: (This adding window.html
)
<script src="https://unpkg.com/htm-chef@1.0.0"></script>
Using ES6 modules:
<script type="module">
import html from 'https://unpkg.com/htm-chef@1.0.0?module'
</script>
Using module bundlers: (You need setup a bundler and install htm-chef
)
import html from 'htm-chef'
Usage
Basic
With jsut JavaScript:
document.body.appendChild(html`<h1>Hello</h1>`)
With jQuery:
$('body').append(html`<h1>Hello</h1>`)