thanks! Looks like JS
commands create a bit of an array structure, going to explore execJS next to see how that gets managed. The docs mention execJS for a brief second.
I wonder then, if I can simulate phxPrivate.sticky
property with my own DOM changes, maybe not. Will investigate.
JS
commands are great but right now they are heavily lacking any kind of node-creation, I am taking a similar approach to alpine of writing a <template>
tag and then using Node.cloneNode
, so DOM patches from the server clears my cloned nodes, even for unrelated changes because the client-side cache of the DOM does not account for my cloned nodes, as I understood from this explanation.