Closed MonoidMusician closed 1 year ago
If we insert an empty element, ie <input type="hidden" value="fooooo"/>
every time a dyn
is created, then we can grab that element and use it as a reference for all child insert/delete/move operations.
Fixed now that Domable
is a monoid.
Currently, the dynamic elements like
envy
,dyn
,switcher
are not compositional because they insert nodes into their parent without regard to what other children would be there. This means they always end up after the other children:(Similar issue with
envy $ map
instead ofswitcher
, and similar issues withdyn
, &c. And it gets worse ifD.span_
is replaced withfixed
– then it even leaks into the parent of the above bussed node.)We need to find a way to make them context-aware, probably by tracking how many children come before and after them (dynamically, since it may change with other nodes).