swup-morph-plugin
swup-morph-plugin copied to clipboard
Consider switching to Idiomorph
Morphdom has a few known limitations if it comes to id-less parent elements. That's why the creator of HTMX has developed an alternative library called Idiomorph. The improvements are being presented quite nicely in the library's readme.
Maybe it would be worth a thought for morph plugin to consider switching to Idiodom?
Thanks for calling my attention to idiomorph, it certainly looks interesting. I'll need to check it out and see about backward compatibility. The options and callbacks look like they follow their own naming conventions, unfortunately.
This might be a good fit for the head plugin as well? Not sure if it understands the order of style tags, but probably worth giving it a go.
I haven't used head plugin yet, so I can't tell if Idiomorph would be a good fit for that plugin as well. But I think it's good to be aware that it exists and especially of the limitations of Morphdom
Note to self: idiomorph still looks very interesting but currently has two major flaws: it doesn't support returning false
from callbacks to prevent replacing or removing nodes, and it's distributed as AMD only. There's PRs for both of these in the pipeline, but nothing released yet.