Live data from Hacker News

API proposed by Chrome: Declarative partial updates

developer.chrome.com

1–10 of 48 posts

Re: API proposed by Chrome: Declarative partial updates

#3
Very odd proposal. The new element syntax is perhaps the boldest choice. I wonder why they thought that was necessary. The idea of using this to defer rendering elements is also odd. So this would use a http long polling style? It really goes against several decades of progress in the web platform, where by now it's long established that you do this sort of thing with xhr. I'm amazed that they even put this in chrome, let along are saying things like "let sites use this new functionality right away even before this lands in other browsers" as if it's a sure thing.

Re: API proposed by Chrome: Declarative partial updates

#7
post #3

Very odd proposal. The new element syntax is perhaps the boldest choice. I wonder why they thought that was necessary. The idea of using this to defer rendering elements is also odd. So this would use a http long polling style? It really goes against several decades of progress in the web platform, where by now it's long established that you do this sort of thing with xhr. I'm amazed that they even put this in chrome…

The new element syntax is needed to signify DOM ranges that may cross the boundaries of HTML element trees.

  

Some text to replace.

Jake Archibald at Mozilla has a good video about this. https://www.youtube.com/shorts/yARSOcqOWvY

Re: API proposed by Chrome: Declarative partial updates

#8
post #3

Very odd proposal. The new element syntax is perhaps the boldest choice. I wonder why they thought that was necessary. The idea of using this to defer rendering elements is also odd. So this would use a http long polling style? It really goes against several decades of progress in the web platform, where by now it's long established that you do this sort of thing with xhr. I'm amazed that they even put this in chrome…

> The new element syntax is perhaps the boldest choice

Probably to not break anything in older browsers which hasn't adopted it yet: new tag will be simply ignored, that's my thinking

> I'm amazed that they even put this in chrome, let along are saying things like "let sites use this new functionality right away even before this lands in other browsers"

It is behind the flag, like every other new proposal they made. Even though some dev would like to use it right now (for regular site visitors, not for self testing), she can't.

Re: API proposed by Chrome: Declarative partial updates

#9
Wtf?

I can't really tell how you'd even use this. Is it supposed to be some sort of micro-optimisation thing to do with how HTML is parsed (now you can download chunks out of order, presumably with some performance gains since it's browser native?).

When I saw the title I was hoping it was going to be a very simple React-like API for constantly updating parts of the DOM with maximum performance since the browser devs are now involved. It doesn't look like that's what this is at all. And all these years later I'm still wondering why browsers aren't implementing an API like that when it's been obvious for over a decade now that real-time DOM updates are a vital browser feature that needs to be performant, and that developers vastly prefer a declarative model to a procedural one. Why after 15-16 years are we still building 100 versions of the same abstraction in user-land to turn Element.append into "refresh these elements when this data changes"?

Re: API proposed by Chrome: Declarative partial updates

#10
post #6

I scanned the page but didn't get -- why? What problem does it solve? Why is a browser in the business of taking care of content update? How is this better than existing solutions?

The WICG explainers do a somewhat better job than this article.

https://github.com/WICG/declarative-partial-updates

https://github.com/WICG/declarative-partial-updates/blob/mai...

Post reply on HN