Tiny nitpick (no need to fix this now), but this will cause more DOM invalidations than necessary. We really only want to update both the position of items and the HTML contents/styles of items in our update loop, since it allows the browser to optimize it as much as possible.