Update a rendered tree to match a new version of it (the next tree, such as one inflated from a server's JSON), by
changing only what differs instead of rendering everything again. Children are matched by id, otherwise by
position and node name. A matched item keeps its element, its id and its listeners; it takes the next item's
attributes and data, and its named listeners are made the next item's. Items the next tree doesn't have are removed,
new ones are added, and then only the changed attributes and nodes are written to the page (see updateElement).
Listeners added as functions (locally, not carried by the next tree) and focus stay where they are, since the
elements do.
Update a rendered tree to match a new version of it (the next tree, such as one inflated from a server's JSON), by changing only what differs instead of rendering everything again. Children are matched by id, otherwise by position and node name. A matched item keeps its element, its id and its listeners; it takes the next item's attributes and data, and its named listeners are made the next item's. Items the next tree doesn't have are removed, new ones are added, and then only the changed attributes and nodes are written to the page (see updateElement).
Listeners added as functions (locally, not carried by the next tree) and focus stay where they are, since the elements do.