Message from JavaScript discussions

November 2020

— Utility types are love 👌


I tried, but if I reinitialize it in my custom.js, it breaks the slider, and from my file I don't know how to make that function run before the standard initialization.

— I prefer the second one 🤷

— Can you perhaps upload an example somewhere?

— I recommend a free account if you do not have any sort of hosting. Unless you do not wish to public whatever you are working on publically.

Message permanent page

— Mh, would be quite troublesome, i cannot disclose it, so I'd need to spend a lot of time in making a mockup-version.
If it works the same, here's Slick's demo:

Anyway, tinkering with alerts, I've seen that the main problem with the piece of code I posted earlier was due to the for(), although I copy-adapted the code from JS' online documentation.
Running as is, it does a variable number of iterations (dunno what makes it vary) at every mutation, and the value of remains the same every single time.

Message permanent page

— Is that because the classList of the referenced mutation target hasn't changed?

— No u don't

— Jk

— Can anyone recommend some starters on Deno? (+TS)

— Is this considered good practice?

document.querySelectorAll(".class").forEach((el) => {
el.addEventListener("click", function () {
let existing = document.querySelector("#redBorder");
if (existing != null) {
existing .id = "";
} = "redBorder";

Message permanent page

— Do you have multiple elements with the id "redBorder"?