Add HX-Retarget header (#2)

This commit is contained in:
2021-11-26 12:49:48 -05:00
parent 5906f3b295
commit 9fcba06e75
3 changed files with 17 additions and 2 deletions

View File

@@ -74,6 +74,10 @@ module Handlers =
let withHxRefresh : bool -> HttpHandler =
toLowerBool >> setHttpHeader "HX-Refresh"
/// Allows you to override the `hx-target` attribute
let withHxRetarget : string -> HttpHandler =
setHttpHeader "HX-Retarget"
/// Allows you to trigger a single client side event
let withHxTrigger : string -> HttpHandler =
setHttpHeader "HX-Trigger"