1. Configured Idiomorph and the morph-retain attribute
this swap will retain the specified attributes of the DOM element when swapping it.
a matching strategy provided by the HTMX idiomorph extension does the hard work of matchin DOM elements
and retaining the state (including HTML :focus & :active states)
this allows for subscription-based interfaces that can safely push UI updates which swap overtop a DOM which has local state - without destroying the local state.
example:
;div
=hx-post "/neo/hawk{...}"
=hx-swap "morph"
=hx-target "#some-target"
=morph-retain "class,open" :: these attributes will persist
; ...
==
2. Improved the names of the arms I added to manx-utils
got:mu cord of attribute, or crash
get:mu (unit tape) of attribute, or crash
vol:mu cord of value on named el within nod, or crash
val:mu (unit tape) of value on named el within nod, or crash
1. Configured Idiomorph and the
morph-retain
attributethis swap will retain the specified attributes of the DOM element when swapping it.
a matching strategy provided by the HTMX idiomorph extension does the hard work of matchin DOM elements and retaining the state (including HTML :focus & :active states)
this allows for subscription-based interfaces that can safely push UI updates which swap overtop a DOM which has local state - without destroying the local state.
example:
2. Improved the names of the arms I added to manx-utils
got:mu
cord of attribute, or crashget:mu
(unit tape) of attribute, or crashvol:mu
cord of value on named el withinnod
, or crashval:mu
(unit tape) of value on named el withinnod
, or crash