Detail
Detail
If the user scrolls in a table, additional rows, if any, are reloaded in the scroll direction and removed in the "other direction", so that the same number of rows are always displayed.
Currently, it is implemented in such a way that first a "new" tbody is created, which then replaces the "old" tbody in the DOM. This has the advantage that as few operations as possible have to be performed on the DOM itself, since they are usually "expensive".
To create the "new" tbody a DocumentFragment is used. Copies of the old lines are added to this fragment, if they need to be displayed further, or placeholder lines for the new lines.
Creating a new tbody separately and then replacing the old tbody has the disadvantage that firstly copies of existing rows of the "old" tbody are used for the new tbody and secondly all rows of the "old" tbody are removed to be mostly added again later.
Instead, the table should be extended incrementally.
Test
Refactoring.
Display table and test reloading rows. It should be as functional as before.