summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/htmx.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/htmx.js b/src/htmx.js
index e81d96a9..2bb58239 100644
--- a/src/htmx.js
+++ b/src/htmx.js
@@ -3504,7 +3504,11 @@ return (function () {
}
if (hasHeader(xhr,/HX-Retarget:/i)) {
- responseInfo.target = getDocument().querySelector(xhr.getResponseHeader("HX-Retarget"));
+ if (xhr.getResponseHeader("HX-Retarget") === "this") {
+ responseInfo.target = elt;
+ } else {
+ responseInfo.target = querySelectorExt(elt, xhr.getResponseHeader("HX-Retarget"));
+ }
}
var historyUpdate = determineHistoryUpdates(elt, responseInfo);