← Back to context

Comment by ethbr1

1 day ago

When that data streams in though, how is a developer defining what it changes?

Or in this hypothetical is the remote server always directly sending HTML?

I was thinking more along the latter lines - i.e. the link/button would specify the ID of the element to update, and it would be replaced with the received HTML.

If we're unwinding back to early 00s though, it could also be fetching XML from the server and then running it through the XSLT stylesheet associated with the current document to convert it to HTML, to reduce the amount of data on the wire.

The specifics could be debated here. But I'm pretty sure that a generic mechanism could be devised that'd adequately cover many use cases that require JS today.