DioxusLabs / blitz

High performance HTML and CSS renderer powered by WGPU
Apache License 2.0
2.12k stars 42 forks source link

Add a root html element in Dioxus integration #120

Closed cfraz89 closed 3 months ago

cfraz89 commented 3 months ago

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 and tailwind no longer crash, and render correctly as far as they can.