Earlier quoted context omitted.
> the DOM is just fundamentally unsuited for app UI rendering... Consider the following: Native UI: is a tree of widgets. Each widget has sematic properties / attributes. Each widget may have style properties (colors ,fonts, etc.). Each widget has exactly on parent and may have multiple children. There is an API for all of these. HTML/DOM UI: Same as above, just replace "widget" by "element". Could you explain then w…
The most glaring is the ability to measure things (including text) in order to lay them out, rather than adding stuff to the tree and waiting a while for somebody else to lay them out in order to measure them. Followed closely by absolutely everything about the way overflow "works". After that I'd add the absolutely batshit insane hoops through which one still must jump to build any sort of text editing component wit…
This has nothing with the DOM (or HTML or CSS for that matter).
Yes, sometimes in desktop UI you will need to know exact element position/dimensions. That's why in Sciter I've added:
1. element.update(); method, it will force dimensions to be calculated at this moment.
2. element.onSize = function() {...} called when dimensions of the element change.
3. element.paintContent = function(graphics) {} called to paint the element on graphics. Dimensions and position of the element is known at this moment.
4. There is a Graphics.Text object that allows to calculate (not just render) text and glyph positions.
My main point with all this: it is a matter of API provided and has nothing with HTML/CSS per se.
For that matter, Flutter also uses DOM (tree of widgets, etc.). It is just that its style system is not declarative and misses cascading - for some reasons they decided to use WPF/XAML way of doing business. But we've already sang "Sic transit gloria mundi" to WPF ...
For the text editing... check html-notepad : https://html-notepad.com/ . Left sidebar (structure outline) is computed and painted in immediate rendering painting mode - when paintContent of the document is invoked.