-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
make the base of URL constructor configurable? #3212
Comments
Hey, as it's a niche usecase, I would recommend either:
Hope this helps! |
Hey, yes it helped, thank you :) not sure if I should close this though, I
can still see a use case for this 🤔
…On Wed, Feb 26, 2025, 08:43 Vincent ***@***.***> wrote:
Hey, as it's a niche usecase, I would recommend either:
- Adding a htmx:configRequest event
<https://htmx.org/events/#htmx:configRequest> listener in your JS to
modify the request's URL through event.detail.path (just realized that
this event's documentation doesn't mention path though... But it's here
<https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L4367-L4384>
!)
- Creating a custom extension to handle that (that would use the same
mechanism as described in my first point, this would simply allow you to
configure it per-element with for example the said URL prefix in an
attribute value)
Hope this helps!
—
Reply to this email directly, view it on GitHub
<#3212 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACOHZTQUU2EBHZEHLGXTDZD2RVWBLAVCNFSM6AAAAABX2TPHCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBUGE3TSNRUGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: Telroshan]*Telroshan* left a comment (bigskysoftware/htmx#3212)
<#3212 (comment)>
Hey, as it's a niche usecase, I would recommend either:
- Adding a htmx:configRequest event
<https://htmx.org/events/#htmx:configRequest> listener in your JS to
modify the request's URL through event.detail.path (just realized that
this event's documentation doesn't mention path though... But it's here
<https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L4367-L4384>
!)
- Creating a custom extension to handle that (that would use the same
mechanism as described in my first point, this would simply allow you to
configure it per-element with for example the said URL prefix in an
attribute value)
Hope this helps!
—
Reply to this email directly, view it on GitHub
<#3212 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACOHZTQUU2EBHZEHLGXTDZD2RVWBLAVCNFSM6AAAAABX2TPHCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBUGE3TSNRUGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a rather niche use case (and will probably deploy a fork for now) where I'm trying to use HTMX out of an iframe with
[href=about:srcdoc]
. So when HTMX tries to construct any URL at all it's expanded tonew URL("the path", "about:srcdoc")
which obviously isn't a valid url.Would it be possible to add a config option to specify the base parameter?
Like
where
"root"
would have the special meaning of using the root windows url.The text was updated successfully, but these errors were encountered: