Package Exports
- xou-browser
- xou-browser/raw
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (xou-browser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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