Streaming AI Responses as HTML with streamAppendHTML()
Reparsing the whole LLM response on every chunk recreates elements and loses state such as text selection. streamAppendHTML() returns a WritableStream that parses HTML onto the end of an element. This article covers its usage and sanitization.


