bigskysoftware / htmx

</> htmx - high power tools for HTML
https://htmx.org
Other
38.06k stars 1.29k forks source link

Add support for 3rd party swap algorithms (morphdom, etc.) #6

Closed 1cg closed 4 years ago

1cg commented 4 years ago

Someone mentioned morphdom in the chat:

https://github.com/patrick-steele-idem/morphdom

Looks like a cool project and would be neat to make kutty swapping pluggable so you could do something like:

  kutty.registerSwap("morphdom", {swap:function(target, content){morphdom(target, elt)}}

And then use it like so:

  <div kt-get="/example" kt-swap="morphdom">This is replaced w/ Morphdom</div>
1cg commented 4 years ago

Fixed in dev using the new extensions mechanism.