0.1.8 • Published 4 years ago

picohtml v0.1.8

Weekly downloads
15
License
MIT
Repository
github
Last release
4 years ago

Installation

$ npm install picohtml

Usage

import { html, render } from "picohtml";

const el = html`<h1>Hello planet</h1>`;

render(el, document.body);

Attaching event listeners

import { html, render } from "picohtml";

const click = () => alert("Hello planet!");
const el = html`<button onclick=${click}>Click</button>`;

render(el, document.body);

Insert template literal and picohtml literal

import { html, render, raw } from "picohtml";

const text = `<p>Text</p>`;
const htmlText = () => html`<p>HTML Text</p>`;
const el = html`<div>${text} ${raw(htmlText())}</div>`;

render(el, document.body);

License

MIT

See Also

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

5 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago