imacrayon / alpine-ajax

An Alpine.js plugin for building server-powered frontends.
https://alpine-ajax.js.org
MIT License
558 stars 11 forks source link

Any way to make incoming html replace the innerHTML of target instead of the whole target? #63

Closed nmabhinandan closed 1 month ago

nmabhinandan commented 5 months ago

Not having this option is making it awkward to handle server side html generation for full page refreshes. Is this on the roadmap or is there a reason why this intentionally is left out? This can be an x-merge option.

imacrayon commented 5 months ago

Hey, yes, full page refreshes are what I’m starting to work on right now. My initial plan is to support merging the <head> element, announcing page changes for tools like screen readers, and caching back/forward history.

wout commented 5 months ago

@imacrayon That's great to hear! I was also looking at it and preparing a proposal PR to start a conversation. But it sounds like you have a clear vision already. 🤓️

imacrayon commented 1 month ago

Duplicate of #40