Fixes #81 - Currently, dioxus apps without a single root element crash when rendered in blitz. This fixes that by creating a virtual <html> root element.
I experimented with a couple of other approaches as well, such as:
treating Document nodes as an element as well - a bit of an impedance mismatch since stylo makes a distinction between documents and elements
abolishing the concept of a root element and rendering all child elements of the root node - mismatch since taffy wants to draw a root element.
So this way seemed to be the best way to make it work out. With this fix you should find that the dioxus examples such as bare_style and tailwind no longer crash, and render correctly as far as they can.
Fixes #81 - Currently, dioxus apps without a single root element crash when rendered in blitz. This fixes that by creating a virtual
<html>
root element.I experimented with a couple of other approaches as well, such as:
So this way seemed to be the best way to make it work out. With this fix you should find that the dioxus examples such as
bare_style
andtailwind
no longer crash, and render correctly as far as they can.