code: function _scrollHandler(e) {
          // Document scrolls can be updated immediately. Any other scrolls
          // need to be updated on a timer to ensure the layout is correct.
          if (e.target === window.document) {
              redrawHighlights();
          } else {
              if (_remoteHighlight || _localHighlight) {
                  window.setTimeout(redrawHighlights, 0);
              }
          }
      }
docs: Add a capture-phase scroll listener to update highlights when any element scrolls.