code: function PDFFindController_updateMatchPosition(pageIndex, index, elements, beginIdx) {
              if (this.selected.matchIdx === index && this.selected.pageIdx === pageIndex) {
                var spot = {
                  top: FIND_SCROLL_OFFSET_TOP,
                  left: FIND_SCROLL_OFFSET_LEFT
                };
                scrollIntoView(elements[beginIdx], spot, /* skipOverflowHiddenElements = */
                true);
              }
            }
docs: The method is called back from the text layer when match presentation
  is updated.
  @param {number} pageIndex - page index.
  @param {number} index - match index.
  @param {Array} elements - text layer div elements array.
  @param {number} beginIdx - start index of the div array for the match.