allow createElement to return DocumentFragment?
- Dominant language
- JavaScript
- Stars
- 364
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
`nanohtml` now supports document fragments, which are very handy for returning a collection of siblings without having to wrap them in an arbitrary element.
However `nanocomponent` is not currently designed to handle this.
If we modify the `el instanceof window.Element` assert in `_handleRender` to also accept `window.DocumentFragment`, we encounter an error because nanocomponent is trying to brand the returned node (which isn't a node).
This also complicates proxying and many other things. I'm not sure how much of a rewrite this would require, but I do think it would be nice to support this feature.
Thoughts?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.