random bug depending chunks
There is an error according to the HTML chunks that are received. I see that when it happens, the lastNodeAdded is the same node that the end of the next chunk:
In this case, the img node looks created but the next chunk starts with </img>.
Same here:
The type-form custom element looks created but the next chunk has the closing tag of type-form. In this case is not displaying the slot of type-form because it comes on the next chunk together with the closing tag of type-form.
I get a 404 trying to see the images
I get a 404 trying to see the images
Thanks @danielart , updated
the problem is in the diffing, it makes the diffing of the element when the next chunk that completes the content of the element hasn't arrived yet, so the diffing is incorrect and it leaves parts. The problem with this bug is that it is random because the browsers process the streaming chunks each time with a different size, maybe by setting an await it can be played, I was looking to see if I could find a way to play it in the test. The tests of this library are in playwright to use the behavior of the browsers.
Probably we can assume it's closed if the parser opens an element outside it
posible solution
When detecting the last node of the chunk it is better to implement it in a different way, the implementation with the attribute does not work and it is the one that makes the mismanagement resulting in this bug. Suggestion of proposal for this detection: look if it has no more nextSibling, neither it nor its parents and it has not yet finished streaming, then it means that it is the last node of a chunk.