xou-browser

2.0.2 • Public • Published

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

Package Sidebar

Install

npm i xou-browser

Weekly Downloads

3

Version

2.0.2

License

MIT

Unpacked Size

8.38 kB

Total Files

5

Last publish

Collaborators

  • tobihrbr