nanohtml
nanohtml copied to clipboard
:dragon: HTML template strings for the Browser with support for Server Side Rendering in Node.
`` html`1. ` `` always becomes `1.`. Since whitespaces are relevant in inline context and ``, is there a way to insert whitespaces as-is?
If an svg element has multiple path tags inside, only the first path is added to the nano element. If I have an svg element like this: ``` ``` When...
```js html` ` ``` It can be useful if we get a declarative HTML way to conditionally define an attribute. Thoughts? cc @sidvishnoi
``` html`` ``` Becomes `` instead of spec-compliant ``.
``` html`.` ``` This ignores `` and returns `"."`, whereas `` html`..` `` correctly returns a `DocumentFragment`. Workaround: `` html`.${""}` ``
`` html`` `` becomes `span`. Should probably be `` or ``.
What do you think of supporting `&&` operator-based conditionals in interpolated expressions? Current syntax: ``` javascript html`` ``` Proposed syntax to support: ``` javascript html`` ``` The proposed syntax is...
Here's a case when multiple roots throws an error: ```js var html = require('nanohtml') var nums = [10,20,30] var el = html` Hello planet ${nums.map(n => html`${n}` )} ` document.body.appendChild(el)...
Trying to render [@stdlib/plot](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/plot/ctor) with `nanohtml` ```js import Plot from '@stdlib/plot/ctor' import html from 'nanohtml' let plot = new Plot([[0,1,2]], [[0,2,1]]) document.body.appendChild(html(plot.render('html'))) ``` getting ```sh Uncaught (in promise) DOMException: Failed...
This PR adds the support for custom components (web components) ~Blocked on: https://github.com/choojs/hyperx/pull/68~ ```js // MyComponent.js class MyComponent extends HTMLElement { connectedCallback () { this._shadow = this.attachShadow({ mode: 'open' })...