22
how to turn events on and off in Javascript
(lemmy.ml)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
For your own sanity, please use a formatter for your IDE. This will also help when others (and you) read the code, as indentation is a convenience for understanding program flow. From what I see:
enableanddisablefunctions are never called for this portion of codeenabledvariable, if so it never passes scopes between thehandleClickandanimationmethodsawaitforinvokeorupdateCurrentBox, causing all the code after either to immediately run. As a result,enabledis neverfalse, since it just instantly flips back totrue. I'm not sure what libraryinvokeis from, but there should be a callback or the function returns aPromisewhich can beawaited.