Scroll two divs simultaneously

On example of diff2html result

let sides = this.diffResult.nativeElement.querySelectorAll('.d2h-file-side-diff');
sides.forEach((sideDiv,idx) => {
  sideDiv.addEventListener('scroll', (event) => {          
    let scrollLeft = event.target.scrollLeft;
    sides[idx==0?1:0].scrollLeft = scrollLeft;
  });
});