5 ms·
It seems like what you're describing is DIFFing the page DOM, then using the delta to update the page. Sounds cool, but for something like your comments example
by profquail 17y ago
It seems like what you're describing is DIFFing the page DOM, then using the delta to update the page. Sounds cool, but for something like your comments example, why wouldn't you just reload the data and have a client-side script alter the DOM (unless adding new comments changes the layout of the page, it's going to be easier to do that than to calculate the new HTML DOM with the new comments and apply it to the page).
- olalonde 17y agoYou`re right about this particular example. However, I wanted the library to be flexible enough to handle changes in the DOM (not only the content of some elements). Of course, if the DOM changes too heavily (completely different layout), this library wouldn't really make sense.