handles the insertion and deletion of actual DOM nodes, triggered by the
DomApplier
. Correct?
2. The
ComposeDomNode
really ties into the internals of the composer. Is this because DOM recomposition requires only updating DOM elements and/or inserting/deleting them, instead of the clear-screen-redraw-routine of canvas/skia based rendering?
3. In the Applier I see (just like in Jake Whartons Mosaic demo) that they always assume the tree is built bottom-up. How is this known / enforced?
1. yes
2. I would say ComposeDomNode is not really about DOM (except the naming). In androidx compose there is ComposeNode and it's quite similar. ComposeDomNode was created to support the scoped content (
Hmm, maybe I am confused. I thought the DomApplier is called from somewhere else. Just because it doesn't implement a method, how is it then enforced?
o
Oleksandr Karpovich [JB]
05/09/2022, 10:47 AM
both methods get invoked here. Since only one of them is implemented in actual applier, then an element gets inserted only once either in topDown or bottomUp way. Here is some doc about applier
a
Arjan van Wieringen
05/10/2022, 9:55 AM
Thanks, I was confused. You can decide yourself, as Applier implementor, if you choose bottom-up or top-down but both of them are called always. I thought that it was required to implement the whole interface.