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

hx-swap should default to outerHTML if hx-select is set? #24

Closed
mqudsi opened this issue May 19, 2020 · 1 comment
Closed

hx-swap should default to outerHTML if hx-select is set? #24

mqudsi opened this issue May 19, 2020 · 1 comment

Comments

@mqudsi
Copy link

mqudsi commented May 19, 2020

If you consider that hx-select is going to pretty much always be used when your backend is serving a full response rather than a partial response (i.e. for graceful enhancement ajaxification of a regular document that would normally link to a full page), I believe it makes sense for hx-swap to automatically default to outerHTML rather than innerHTML so that the entirety of the element in the response is swapped out one-for-one rather than the element being embedded within itself.

@1cg
Copy link
Contributor

1cg commented May 21, 2020

I agree that makes some logical sense, but I'm more and more against hidden stuff like this in my old age. Since the attributes are inherited from parents, I don't think this is too much of a burden.

@1cg 1cg closed this as completed May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants