There is nothing wrong with parseInt(document.getQuerySelector(".item > .item__quantity"), except for it not being parseInt(document.getElementById("uniqueAutogeneratedId")).
Developers just shouldn't write that kind of fragile code by hand. But there's nothing wrong at all with the code being there.
That is literally fragile code. You contradict yourself. I really want to see any of the people that hate on modern frameworks build any complex web app in a reasonable amount of time with the same level of stability as using i.e. SvelteKit
Developers just shouldn't write that kind of fragile code by hand. But there's nothing wrong at all with the code being there.