summaryrefslogtreecommitdiffstatshomepage
path: root/dist/htmx.js
diff options
context:
space:
mode:
authorCarson Gross <carson@bigsky.software>2022-11-04 10:27:22 -0600
committerCarson Gross <carson@bigsky.software>2022-11-04 10:27:22 -0600
commit09dfd1009e21df75b5df3f787bd442819799d7bf (patch)
tree4bd8d31f61d863a4c4de0d6e1f789e028ba9a0e3 /dist/htmx.js
parenta86a96fb70ae5862e26de5f9455b6c4b4e101f92 (diff)
downloadhtmx-09dfd1009e21df75b5df3f787bd442819799d7bf.tar.gz
htmx-09dfd1009e21df75b5df3f787bd442819799d7bf.zip
ie fix
Diffstat (limited to 'dist/htmx.js')
-rw-r--r--dist/htmx.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/dist/htmx.js b/dist/htmx.js
index 01e706a9..f0dc4c93 100644
--- a/dist/htmx.js
+++ b/dist/htmx.js
@@ -368,13 +368,14 @@ return (function () {
return elemTop < window.innerHeight && elemBottom >= 0;
}
- function bodyContains(elt) {
- if (elt.getRootNode() instanceof ShadowRoot) {
- return getDocument().body.contains(elt.getRootNode().host);
- } else {
- return getDocument().body.contains(elt);
- }
- }
+ function bodyContains(elt) {
+ // IE Fix
+ if (elt.getRootNode && elt.getRootNode() instanceof ShadowRoot) {
+ return getDocument().body.contains(elt.getRootNode().host);
+ } else {
+ return getDocument().body.contains(elt);
+ }
+ }
function splitOnWhitespace(trigger) {
return trigger.trim().split(/\s+/);