Marc Worrell
Marc Worrell
So after there was an update of the UI, because the UI model loaded a template, you want to be notified that we updated with the id of the element...
Maybe the ui manager publishes every element id on a topic after that element is patched?
Something like `model/ui/event/dom-update/:id` ? Then you could hook into that event whenever an element you are interested in is updated in the DOM by the ui manager.
Ok, I think we can add that to the Cotonic UI manager - @mmzeeman are you ok with that?
I don't think we need an incremental DOM hook, the UI manager know when it called the incremental DOM to update a certain element, so it could publish to the...
We could add a "worker supervisor" and have its API made accessible by standard model topics. But that is something for Cotonic.
See https://github.com/cotonic/cotonic/pull/32 for the DOM update event.
@heiheshang the `onmessage` is indeed the easiest way to exchange, but we want to stay flexible where a handler is running. This decoupling of locality is possible by using the...
Cotonic now publishes to the topic `model/ui/event/dom-updated/+id` where `id` is the element id of the HTML node that was updated. You can update Cotonic with `git pull` in `apps/zotonic_mod_base/priv/lib-src/cotonic/`
Does this solve the problem you described?