diff --git a/htmx.go b/htmx.go index 964be70..9809b51 100644 --- a/htmx.go +++ b/htmx.go @@ -98,6 +98,12 @@ func Disable(v string) g.Node { return attr("disable", v) } +// Disable element until htmx request completes. +// See https://htmx.org/attributes/hx-disabled-elt/ +func DisableElt(v string) g.Node { + return attr("disable-elt", v) +} + // Disinherit controls and disables automatic attribute inheritance for child nodes. // See https://htmx.org/attributes/hx-disinherit func Disinherit(v string) g.Node { diff --git a/htmx_test.go b/htmx_test.go index 1eeae9a..8147328 100644 --- a/htmx_test.go +++ b/htmx_test.go @@ -28,6 +28,7 @@ func TestAttributes(t *testing.T) { "confirm": hx.Confirm, "delete": hx.Delete, "disable": hx.Disable, + "disable-elt": hx.DisableElt, "disinherit": hx.Disinherit, "encoding": hx.Encoding, "ext": hx.Ext,