Closed mattwigham closed 5 months ago
Interesting! I hadn’t come across that extension before.
It would be cool if we could hack this by intercepting ajax:merged
, but unfortunately that event doesn’t allow the target
to be changed.
I think I like where your idea is going. It might even be a better alternative to the current follow
and nofollow
modifiers, those modifiers have never really sat right with me, and maybe we could replace them with something like x-target.302="_top"
which would reload the page if a form submission redirects.
Perfect!
First off, love the plugin. Thanks so much for putting in the time.
Second, I’d love the ability to put modifiers on
x-target
based on the response code returned from the server, similar to htmx's response targets extension. Perhaps something like:Perhaps something like this could be accomplished with intercepting the
ajax:merge
event with some custom retargeting? Either way, the Alpine modifier syntax would be some wonderful ergonomics.Thanks again.