Closed YerkoPalma closed 6 years ago
Oh good catch. Is there a similar assertion that covers all node types?
Well, for svg it could be
svg instanceof SVGElement
Now, both, SVGElement and HTMLElement inherits from Element, so for both this works
el instanceof Element
I’m cool with it
buuuut theoretically ''
should be valid too right? or any text fragment?
Why should they be valid?
A nanocomponent consisting of a text node? Eh. Wrap it it in a span
Nanocomponent requires attributes and IDs on the root node
Well, if checking against the Element
interface is a good solution, I could submit a PR, but I'm not sure if I should wait for #77 or something?
No we can land this sooner than later
I have a simple component that should render an svg. But nanocomponent throws
that's because this line fails. I think this assertion should be fixed to include svg (and actually everything that can be handled by
bel
itself)