title: Check if scrollIntoView is completed
body: <p>I am using the following function in a single page application in Angular. When I click on the menu item, I scroll to the relevant div.</p>
  <pre><code>scroll (el) {
      this.sharedService.isClicked.next(true);
      el.scrollIntoView({ behavior: 'smooth', block: 'start' });
  }
  </code></pre>
  <p>How do I check if the element has finished scrolling? I want to avoid the <code>setTimeout</code> function.</p>