05:51
<Ben Smyth>
Hi everyone. I have a suggestion for the DOMTokenList interface. Given class="a b c", the conditional statement if (classList.contains("a")) {classList.replace("a", "d")} else {classList.replace("d", "a")}; could be encapsulated by a function, call it switch(). For example, switch("a", "d"); returns "d b c"; next, switch("a", "d"); returns "a b c". I would find this useful for something like Tailwind utilities. For example, if I wanted to expand/collapse a div, I could use this on the height utility like so: classList.switch("h-1/2", "h-full");
06:36
<annevk>
Ben Smyth: in principle it seems you could do the same with toggle() and less classes, but you could file the sugestion against whatwg/dom; it would help a lot to see Stack Overflow questions requesting similar functionality, library usage, etc. https://whatwg.org/faq#adding-new-features might also help
07:07
<Domenic>
classList.toggle("a"); classList.toggle("d"); seems pretty good to me...
07:15
<Ben Smyth>
Yeah, I just realized ... thanks for listening to my naive pitch anyways
22:05
<sideshowbarker>
mek: Hasn’t the https://wicg.github.io/file-system-access/ spec been superseded by https://fs.spec.whatwg.org/ ?
If so, shouldn’t https://wicg.github.io/file-system-access/ be changed to redirect to https://fs.spec.whatwg.org/ — or else at least marked in some way to indicate it shouldn’t be used any longer?
22:06
<sideshowbarker>
ah, nevermind, I see from https://github.com/WICG/file-system-access/issues/370 you’re on it already