summaryrefslogtreecommitdiffstatshomepage
path: root/src/htmx.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/htmx.js')
-rw-r--r--src/htmx.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/htmx.js b/src/htmx.js
index 1f0b622f..bebe3785 100644
--- a/src/htmx.js
+++ b/src/htmx.js
@@ -1626,6 +1626,9 @@ var htmx = (function() {
* @param {HtmxSettleInfo} settleInfo
*/
function swapOuterHTML(target, fragment, settleInfo) {
+ if (target.tagName === "BODY") { // special case the body to innerHTML because DocumentFragments can't contain a body elt unfortunately
+ return swapInnerHTML(target, fragment, settleInfo);
+ }
/** @type {Node} */
let newElt
const eltBeforeNewContent = target.previousSibling