diff options
author | Carson Gross <carson@bigsky.software> | 2025-03-06 15:59:04 -0700 |
---|---|---|
committer | Carson Gross <carson@bigsky.software> | 2025-03-06 15:59:04 -0700 |
commit | b8a29903dc0f61c6b42a05025f6e377bcb413eb9 (patch) | |
tree | 9bdaac61814276bb4bf024ebe74f744f914d5824 | |
parent | 7b34baed8401ec9637fc048f705a6d6b902eda77 (diff) | |
parent | 07d35186fbd6ec3074d86b0b041e1b4869a33f36 (diff) | |
download | htmx-b8a29903dc0f61c6b42a05025f6e377bcb413eb9.tar.gz htmx-b8a29903dc0f61c6b42a05025f6e377bcb413eb9.zip |
Merge remote-tracking branch 'origin/master'
-rw-r--r-- | www/content/api.md | 4 | ||||
-rw-r--r-- | www/content/attributes/hx-trigger.md | 2 | ||||
-rw-r--r-- | www/content/essays/alternatives.md | 2 | ||||
-rw-r--r-- | www/content/essays/interviews/leonard_richardson.md | 2 | ||||
-rw-r--r-- | www/content/headers/hx-location.md | 2 | ||||
-rw-r--r-- | www/content/headers/hx-push-url.md | 2 | ||||
-rw-r--r-- | www/content/headers/hx-push.md | 2 | ||||
-rw-r--r-- | www/content/headers/hx-redirect.md | 3 | ||||
-rw-r--r-- | www/content/headers/hx-replace-url.md | 3 | ||||
-rw-r--r-- | www/content/headers/hx-trigger.md | 2 | ||||
-rw-r--r-- | www/content/reference.md | 3 |
11 files changed, 23 insertions, 4 deletions
diff --git a/www/content/api.md b/www/content/api.md index 4b9749a7..5ea9a63c 100644 --- a/www/content/api.md +++ b/www/content/api.md @@ -1,5 +1,9 @@ +++ title = "Javascript API" +description = """\ + This documentation describes the JavaScript API for htmx, including methods and properties for configuring the \ + behavior of htmx, working with CSS classes, AJAX requests, event handling, and DOM manipulation. The API provides \ + helper functions primarily intended for extension development and event management.""" +++ While it is not a focus of the library, htmx does provide a small API of helper methods, intended mainly for [extension development](https://htmx.org/extensions) or for working with [events](@/events.md). diff --git a/www/content/attributes/hx-trigger.md b/www/content/attributes/hx-trigger.md index 597e77af..5dcbcc77 100644 --- a/www/content/attributes/hx-trigger.md +++ b/www/content/attributes/hx-trigger.md @@ -56,7 +56,7 @@ for a global symbol with the name `foo` Standard events can also have modifiers that change how they behave. The modifiers are: * `once` - the event will only trigger once (e.g. the first click) -* `changed` - the event will only change if the value of the element has changed. Please pay attention `change` is the name of the event and `changed` is the name of the modifier. +* `changed` - the event will only fire if the value of the element has changed. Please pay attention `change` is the name of the event and `changed` is the name of the modifier. * `delay:<timing declaration>` - a delay will occur before an event triggers a request. If the event is seen again it will reset the delay. * `throttle:<timing declaration>` - a throttle will occur after an event triggers a request. If the event diff --git a/www/content/essays/alternatives.md b/www/content/essays/alternatives.md index c7e8fe48..4e2d6fa6 100644 --- a/www/content/essays/alternatives.md +++ b/www/content/essays/alternatives.md @@ -71,7 +71,7 @@ You can see many examples of Datastar in action [here](https://data-star.dev/exa Speaking of Alpine (which is a common library to use in conjunction with htmx) you should look at [Alpine AJAX](https://alpine-ajax.js.org/), an Alpine plugin which integrates htmx-like concepts directly into Alpine. -If you are already and Alpine enthusiast, Alpine AJAX allows you to stay in that world. +If you are already an Alpine enthusiast, Alpine AJAX allows you to stay in that world. You can see many examples of Alpine AJAX in action [here](https://alpine-ajax.js.org/examples/). diff --git a/www/content/essays/interviews/leonard_richardson.md b/www/content/essays/interviews/leonard_richardson.md index 6dfbc216..0f9f68ec 100644 --- a/www/content/essays/interviews/leonard_richardson.md +++ b/www/content/essays/interviews/leonard_richardson.md @@ -1,7 +1,7 @@ +++ title = "An interview with Leonard Richardson" description = """\ - In this interview, Leonard Richardson, creator of the Richardson Maturity Model for RESTful web services discusses\ + In this interview, Leonard Richardson, creator of the Richardson Maturity Model for RESTful web services discusses \ the history of REST, interoperability in APIs and his impression of newer approaches such as GraphQL.""" date = 2025-02-19 updated = 2025-02-19 diff --git a/www/content/headers/hx-location.md b/www/content/headers/hx-location.md index 7beaf611..afe67a81 100644 --- a/www/content/headers/hx-location.md +++ b/www/content/headers/hx-location.md @@ -1,5 +1,7 @@ +++ title = "HX-Location Response Header" +description = """\ + Use the HX-Location response header in htmx to trigger a client-side redirection without reloading the whole page.""" +++ This response header can be used to trigger a client side redirection without reloading the whole page. Instead of changing the page's location it will act like following a [`hx-boost` link](@/attributes/hx-boost.md), creating a new history entry, issuing an ajax request to the value of the header and pushing the path into history. diff --git a/www/content/headers/hx-push-url.md b/www/content/headers/hx-push-url.md index cc3dd9bc..7a3c47b5 100644 --- a/www/content/headers/hx-push-url.md +++ b/www/content/headers/hx-push-url.md @@ -1,5 +1,7 @@ +++ title = "HX-Push-Url Response Header" +description = """\ + Use the HX-Push-Url response header in htmx to push a URL into the browser location history.""" +++ The `HX-Push-Url` header allows you to push a URL into the browser [location history](https://developer.mozilla.org/en-US/docs/Web/API/History_API). diff --git a/www/content/headers/hx-push.md b/www/content/headers/hx-push.md index 7ad2c559..cac1307d 100644 --- a/www/content/headers/hx-push.md +++ b/www/content/headers/hx-push.md @@ -1,5 +1,7 @@ +++ title = "HX-Push Response Header (Deprecated)" +description = """\ + The HX-Push response header in htmx is deprecated. Use HX-Push-Url instead.""" +++ The `HX-Push` header has been replaced by [`HX-Push-Url`](@/headers/hx-push-url.md) diff --git a/www/content/headers/hx-redirect.md b/www/content/headers/hx-redirect.md index 120d44d4..0095357d 100644 --- a/www/content/headers/hx-redirect.md +++ b/www/content/headers/hx-redirect.md @@ -1,5 +1,8 @@ +++ title = "HX-Redirect Response Header" +description = """\ + Use the HX-Redirect response header in htmx to trigger a client-side redirection that will perform a full page \ + reload.""" +++ This response header can be used to trigger a client side redirection to a new url that will do a full reload of the whole page. It uses the browser to redirect to the new location which can be useful when redirecting to non htmx endpoints that may contain different HTML `head` content or scripts. See [`HX-Location`](@/headers/hx-location.md) if you want more control over the redirect or want to use ajax requests instead of full browser reloads. diff --git a/www/content/headers/hx-replace-url.md b/www/content/headers/hx-replace-url.md index ba1150cb..12f06058 100644 --- a/www/content/headers/hx-replace-url.md +++ b/www/content/headers/hx-replace-url.md @@ -1,5 +1,8 @@ +++ title = "HX-Replace-Url Response Header" +description = """\ + Use the HX-Replace-Url response header in htmx to replace the current URL in the browser location history without \ + creating a new history entry.""" +++ The `HX-Replace-Url` header allows you to replace the current URL in the browser [location history](https://developer.mozilla.org/en-US/docs/Web/API/History_API). diff --git a/www/content/headers/hx-trigger.md b/www/content/headers/hx-trigger.md index 63c99266..889b56eb 100644 --- a/www/content/headers/hx-trigger.md +++ b/www/content/headers/hx-trigger.md @@ -1,5 +1,7 @@ +++ title = "HX-Trigger Response Headers" +description = """\ + Use the HX-Trigger family of response headers in htmx to trigger client-side actions from an htmx response.""" +++ These response headers can be used to trigger client side actions on the target element within a response to htmx. You diff --git a/www/content/reference.md b/www/content/reference.md index 1cdb9106..ebdb81c1 100644 --- a/www/content/reference.md +++ b/www/content/reference.md @@ -158,7 +158,8 @@ All other attributes available in htmx. | [`htmx:oobBeforeSwap`](@/events.md#htmx:oobBeforeSwap) | triggered before an out of band element swap is done, allows you to configure the swap | [`htmx:oobErrorNoTarget`](@/events.md#htmx:oobErrorNoTarget) | triggered when an out of band element does not have a matching ID in the current DOM | [`htmx:prompt`](@/events.md#htmx:prompt) | triggered after a prompt is shown -| [`htmx:pushedIntoHistory`](@/events.md#htmx:pushedIntoHistory) | triggered after an url is pushed into history +| [`htmx:pushedIntoHistory`](@/events.md#htmx:pushedIntoHistory) | triggered after a url is pushed into history +| [`htmx:replacedInHistory`](@/events.md#htmx:replacedInHistory) | triggered after a url is replaced in history | [`htmx:responseError`](@/events.md#htmx:responseError) | triggered when an HTTP response error (non-`200` or `300` response code) occurs | [`htmx:sendAbort`](@/events.md#htmx:sendAbort) | triggered when a request is aborted | [`htmx:sendError`](@/events.md#htmx:sendError) | triggered when a network error prevents an HTTP request from happening |