Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the pushUrl option for htmx.ajax() calls #2744

Open
wout opened this issue Jul 20, 2024 · 1 comment
Open

Add the pushUrl option for htmx.ajax() calls #2744

wout opened this issue Jul 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@wout
Copy link

wout commented Jul 20, 2024

Currently, there's no way to configure hx-push-url programatically using htmx.ajax(). It would be useful to have a pushUrl option there as well.

As far as I know, the only solutions are sending a 'HX-Push-Url' header in the response or using { source: element } where the referenced element has a hx-push-url attribute. The first is hard to maintain, and the second is quite hackish.

@Telroshan Telroshan added the enhancement New feature or request label Jul 20, 2024
@ALameLlama
Copy link

I've needed to do this to "fake" hx-boost on elements that aren't forms/a tags, would be nice to have support for this directly using htmx.ajax()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants