-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
The examples in documentation, like https://htmx.org/attributes/hx-get/, have always something like hx-get="/example"
.
In the notes section, there is no point about what happens when hx-get=""
. The current behavior is to make a request to the current URL. My guess is that the hx-get
is similar to the action in the HTML spec, where majority of browsers will make the request to the current URL.
But, according to the spec, https://html.spec.whatwg.org/#attr-fs-action, this shouldn't be allowed:
The action and formaction content attributes, if specified, must have a value that is a valid non-empty URL potentially surrounded by spaces. (emphasis added)
Since the HTML 5 specification recommends that a valid non-empty URL is provided to action, for consistency, should HTMX make the same assumption?
I think it would be nice, at least, to have a point in the notes https://htmx.org/attributes/hx-get/ making clear hx-get=""
make the request to the current URL.