htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Why use `var`?

Open KTibow opened this issue 1 year ago • 3 comments

HTMX uses var in many places. This leads to variable leakage. Oddly, in a couple places it already uses let and const. Why the inconsistency?

edit: from some short research it seems like IE11 doesn't support the one place where it actually helps leakage, but i'm not entirely sure, would appreciate it if someone who knows more clarified why it's this way

KTibow avatar Dec 28 '23 18:12 KTibow

Yes. it is possible to use var within the HTMX codebase. it is related to compatibility with IE11

sahiljr-111 avatar Dec 29 '23 15:12 sahiljr-111

What's the status of phasing out IE11? Is IE11 a requirement of some significant sponsor of this project?

lkraav avatar Dec 29 '23 15:12 lkraav

It's planned to be removed from v2 iirc.

Removing it now would be a disaster and come with a big loss of trust.

andryyy avatar Dec 29 '23 17:12 andryyy

It's planned to be removed from v2 iirc.

Removing it now would be a disaster and come with a big loss of trust.

OK. I did a quick search and couldn't locate any container epic issue.

Supporting IE11 without transpiling or whatnot has some loss of trust in the other direction.

lkraav avatar Dec 30 '23 09:12 lkraav

Sigh. Okay, chief.

andryyy avatar Dec 30 '23 10:12 andryyy

As @andryyy said!

alexpetros avatar Jan 02 '24 04:01 alexpetros