tall-dinner-62086
03/06/2023, 1:41 PMhallowed-pillow-66838
03/06/2023, 1:41 PMhallowed-pillow-66838
03/06/2023, 1:42 PMtall-dinner-62086
03/06/2023, 1:43 PMbland-coat-6833
03/06/2023, 1:44 PMtall-dinner-62086
03/06/2023, 1:44 PMhallowed-pillow-66838
03/06/2023, 1:47 PMmysterious-toddler-20573
03/06/2023, 1:48 PMtall-dinner-62086
03/06/2023, 1:48 PMmysterious-toddler-20573
03/06/2023, 1:49 PMmysterious-toddler-20573
03/06/2023, 1:49 PMhallowed-pillow-66838
03/06/2023, 1:52 PMtall-dinner-62086
03/06/2023, 1:53 PMhallowed-pillow-66838
03/06/2023, 1:54 PMtall-dinner-62086
03/06/2023, 1:55 PMhallowed-pillow-66838
03/06/2023, 1:56 PMalert-grass-16919
03/06/2023, 2:16 PMalert-grass-16919
03/06/2023, 2:53 PMlate-king-98305
03/06/2023, 5:53 PMthis
, which is the browser when you're looking at something there. Some linters complain about a top-level this
statement, but you could also use window
to get around that; your redefinition would replace what's there, instead of failing because it's already defined.
Your fix to use var
is very similar, placing it in a global scope where it can shadow what's already there.creamy-dawn-16627
03/06/2023, 6:35 PMmysterious-toddler-20573
03/06/2023, 6:36 PMcreamy-dawn-16627
03/06/2023, 6:39 PMgorgeous-airport-54386
03/06/2023, 9:09 PMonclick="document.body.dispatchEvent(new CustomEvent('myEvent'))"
or JS with the htmx utility functions:
onclick="htmx.trigger('body', 'myEvent')"
or _hyperscript:
_="on click send myEvent to the body"
hallowed-pillow-66838
03/06/2023, 9:30 PMgorgeous-airport-54386
03/06/2023, 9:34 PMhallowed-pillow-66838
03/06/2023, 9:36 PMgorgeous-airport-54386
03/06/2023, 9:38 PM