title: Chrome only error: Failed to execute 'scroll' on 'Window': No function was found that matched the signature provided
body: <p>I'm getting this error in Chrome only (it works in Safari/Firefox):<br>
   <code>Failed to execute 'scroll' on 'Window': No function was found that matched the signature provided.</code>
  The code is inside an inline event:</p>
  
  <pre><code>&lt;div onclick='function scrollToByIntoView () {
      window.scroll({
        top: 0, 
        left: 0, 
        behavior: "smooth"
      })
    };
  scrollToByIntoView();'&gt;
  </code></pre>
  
  <p>I can't understand what's the problem.<br>
  PS: Note that this code is the output I get after DOM rendering. The actual code is splitter in different components/functions that I use in my server side templating engine, as, as noted in comments below, mixing this code directly should be avoided.</p>