xou-browser

Xou in the browser

Usage no npm install needed!

<script type="module">
  import xouBrowser from 'https://cdn.skypack.dev/xou-browser';
</script>

README

XOU-BROWSER

HTML-Template strings for the browser.

This module has been exctracted from Nanohtml.

Install

$ npm install xou-browser

Usage

const xouBrowser = require('xou-browser');

const time = xouBrowser`<span>Time: ${ (new Date()).toUTCString() }</span>`;



document.body.appendChild(node);

API

xouBrowser``

A tagged template literal returning dom nodes.

Example

const node = xou`<div>
  <h1>Hello from xou</h1>
  <p>Xou on <a href="https://github.com/herber/xou">github</a></p>
</div>`;

document.body.appendChild(node);

License

MIT © Tobias Herber