diff options
author | Carson Gross <carson@bigsky.software> | 2024-03-14 19:41:57 -0600 |
---|---|---|
committer | Carson Gross <carson@bigsky.software> | 2024-03-14 19:41:57 -0600 |
commit | ea3beb6f459beeba914f345d9a19dc28e3b49baf (patch) | |
tree | c8987c1c6ffdf52c3495869580aae552e26ef313 /dist/htmx.js | |
parent | 3205e652ee40f9470145e714fc799631b46b9b09 (diff) | |
download | htmx-ea3beb6f459beeba914f345d9a19dc28e3b49baf.tar.gz htmx-ea3beb6f459beeba914f345d9a19dc28e3b49baf.zip |
firefox double exec fix fml
Diffstat (limited to 'dist/htmx.js')
-rw-r--r-- | dist/htmx.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/dist/htmx.js b/dist/htmx.js index b9fc4b06..90190944 100644 --- a/dist/htmx.js +++ b/dist/htmx.js @@ -318,7 +318,8 @@ return (function () { if (htmx.config.inlineScriptNonce) { script.nonce = htmx.config.inlineScriptNonce; } - getInternalData(script).executed = true; // mark as executed due to template insertion semantics + // mark as executed due to template insertion semantics on all browsers except firefox fml + getInternalData(script).executed = navigator.userAgent.indexOf("Firefox") === -1; }) } else { forEach(fragment.querySelectorAll("script"), function (script) { @@ -1933,14 +1934,12 @@ return (function () { } function processScripts(elt) { - if (!htmx.config.useTemplateFragments) { - if (matches(elt, "script")) { - evalScript(elt); - } - forEach(findAll(elt, "script"), function (script) { - evalScript(script); - }); + if (matches(elt, "script")) { + evalScript(elt); } + forEach(findAll(elt, "script"), function (script) { + evalScript(script); + }); } function shouldProcessHxOn(elt) { |