Comments (2)
This is a misunderstanding maybe worth clarifying in the REDME.
The html.node
is an utility to create real DOM nodes and the wire is not a DOM node so it cannot be used directly as such.
Accordingly, the valueOf()
and remove()
works with html
and html.ref(...)
but not with html.node
, as I don't want to attach live methods to fragments as that'd be misleading in terms of DOM behavior, and html.node
is about such DOM behavior.
Don't use html.node
unless you really need it, which is 0.01% of the cases (it's just an extra helper that I regret I've exposed as it keeps being misused).
from uhtml.
To clarify my latter point:
const createWire = () => html`
<button>1</button>
<button>2</button>
`;
Internally, above wier will be "unrolled" as pseudo fragment and handled accordingly while diffing ... but this is an implementation detail you shouldn't care about, or use, unless you are extending the library somehow (see uland).
from uhtml.
Related Issues (20)
- Error with Parcel HOT 3
- Recursive fragment w/ lost lastChild during target update HOT 16
- This sequence of renders crashes in both V3 and V4 HOT 15
- Custom Element setters no longer called when uhtml renders them with a direct attribute HOT 9
- Bug? Rendering as dom element broken for 4.4.1, not 4.3.5 HOT 14
- FYI: xeito framework HOT 3
- Question about non-changing interpolated content HOT 7
- Working with inheritance HOT 5
- Renderable type doesn't include valueOf? HOT 5
- Incompatible with TypeScript when moduleResolution === nodenext HOT 6
- v4 error: Cannot set property className of #<SVGElement> which has only a getter HOT 6
- Bug: texContent -> textContent HOT 4
- Small issue with v4 HOT 9
- Cannot render empty array HOT 2
- Clarify CJS usage in v4 / CJS report with v4 HOT 1
- Typescript issues HOT 13
- Consider bringing global `uhtml` export back HOT 1
- Cannot set property list of #<HTMLInputElement> which has only a getter HOT 10
- Functions no longer allowed as Holes? HOT 3
- V4 crashes on empty array HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uhtml.