News for hackers. Stuff that matters.
Re:How to manage HTML DOM with vanilla JavaScript only? by cies on Thursday April 02, 2020 @11:04AM (#22759814)
> Then the problem is really the API

I think the problem of JS is not the APIs, it's the language itself.

> IMHO what the DOM needs is a good DOM diff API directly included in the browser.

Here you go, part of WebComponents:

https://developer.mozilla.org/en-US/docs/Web/Web_Components/...

> Web Components tries to make things a bit easier by allowing people to write their own widgets that know how to clean up themselves when removed, but it's not there yet apparently.

WCs aims to replace a lot of what is now React. As is "just the view and some encapsulation. With a the litElements lib (or some other) you also get some life cycle callbacks.

> This list of recipes doesn't solve the large front-end app at scale problem.

It did not claim to either.

My 2 cents: that problem is prolly going to be fixed by writing code that compiles to JS (or WASM). JS was the problem all along for big codebases; too quirky, too little safety, very easy to make mistakes.

Re:How to manage HTML DOM with vanilla JavaScript only? by vince14 on Thursday April 02, 2020 @04:31PM (#22763377)
> part of WebComponents

WebComponents do not have DOM diff APIs whatsoever.