mysterious-toddler-20573
12/17/2021, 8:42 PMlate-shampoo-89851
12/17/2021, 9:16 PMgorgeous-ghost-95789
12/17/2021, 9:16 PMgorgeous-ghost-95789
12/17/2021, 9:17 PMadamant-exabyte-92636
12/17/2021, 9:17 PMlate-shampoo-89851
12/17/2021, 9:18 PMadamant-exabyte-92636
12/17/2021, 9:19 PMlate-shampoo-89851
12/17/2021, 9:23 PMflat-ambulance-77117
12/18/2021, 2:15 AMflat-ambulance-77117
12/18/2021, 2:18 AMlet. Lets say we do this twice - in htmx v1.5.0 these scripts would get executed in different scopes and there would be no errors.
But in htmx v.1.6.1 these scripts probably get executed in same scope and javascript raises an error.
I have added this to [htmx discussion on github](https://github.com/bigskysoftware/htmx/discussions/723#discussion-3747823).
Can someone please advise how to deal with this in htmx v1.6.1?
Thanks -mysterious-toddler-20573
12/18/2021, 2:28 AMjs
(function(){
//***** The line below gives error when more than one component is in the page ******//
let fdz = document.getElementById("fdz_<%= @block.id %>")
//More code implementing dropzone js
)()mysterious-toddler-20573
12/18/2021, 2:29 AMflat-ambulance-77117
12/18/2021, 2:32 AMcolossal-glass-79762
12/18/2021, 4:01 AMmysterious-toddler-20573
12/18/2021, 4:27 AMmysterious-toddler-20573
12/18/2021, 4:27 AMgray-morning-3453
12/18/2021, 8:56 AMmysterious-toddler-20573
12/18/2021, 2:12 PMgray-morning-3453
12/18/2021, 3:55 PMmysterious-toddler-20573
12/18/2021, 4:38 PMcareful-musician-14022
12/19/2021, 5:28 PMhx-ext to fire on elements without hx-post or similar explicit attribute. But upgrading from version 1.6.0 to 1.6.1 fixed it. So now I have no questions to ask here, just: thanks for creating and maintaining this awesome tool. ๐abundant-breakfast-94967
12/19/2021, 6:06 PMcareful-musician-14022
12/19/2021, 6:12 PMhx-ext="ignore:..." apply to non-htmx events in inner elements. Contrived example: say I want to disable the "remove-me" extension in some inner elements:
<script src="https://unpkg.com/htmx.org/dist/ext/remove-me.js"></script>
<div hx-ext="remove-me">
<!-- Removes this div after 1 second -->
<div remove-me="1s">To Be Removed...</div>
<div remove-me="1s" hx-ext="ignore:remove-me">To Be Removed...</div>
<div hx-ext="ignore:remove-me">
<div remove-me="1s">To Be Removed...</div>
</div>
</div>
In this case, all three elements are removed after one second, despite the "ignore". Would the remove-me extension need to check for ignores in inner elements itself ๐จ or is there a better way to handle this?abundant-breakfast-94967
12/19/2021, 6:13 PMcareful-musician-14022
12/19/2021, 6:18 PMabundant-breakfast-94967
12/19/2021, 6:20 PMabundant-breakfast-94967
12/19/2021, 6:20 PMgorgeous-airport-54386
12/19/2021, 6:21 PMmysterious-toddler-20573
12/19/2021, 7:02 PMmysterious-toddler-20573
12/19/2021, 7:03 PM