<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>226965</bug_id>
          
          <creation_ts>2021-06-14 04:42:04 -0700</creation_ts>
          <short_desc>window.scrollBy misses checking the type of options param</short_desc>
          <delta_ts>2021-06-15 08:46:51 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="zyscoder@gmail.com">zyscoder</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1769352</commentid>
    <comment_count>0</comment_count>
    <who name="zyscoder@gmail.com">zyscoder</who>
    <bug_when>2021-06-14 04:42:04 -0700</bug_when>
    <thetext>Steps to reproduce:

(1) Open a tab and navigate to any URL;
(2) Open Devtools and run the following code in the Console:
```
window.scrollBy(&apos;\u{1a}&apos;);
```

Actual results:

This code would be evaluated successfully without any exceptions thrown.

Expected results:

As https://drafts.csswg.org/cssom-view/#dom-window-scrollby says, the param should be of ScrollToOptions type. Thus a TypeError exception should be thrown for this code.

In my test, both Chrome and Firefox would throw exceptions:
Chrome: `TypeError: Failed to execute &apos;scrollBy&apos; on &apos;Window&apos;: cannot convert to dictionary.`
Firefox: `Window.scrollBy: Value can&apos;t be converted to a dictionary.`</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1769812</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-06-15 08:44:38 -0700</bug_when>
    <thetext>window.scrollBy(&apos;\u{1a}&apos;); gives me a TypeError on Safari 15. This is likely already fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1769814</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-06-15 08:46:51 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #1)
&gt; window.scrollBy(&apos;\u{1a}&apos;); gives me a TypeError on Safari 15. This is likely
&gt; already fixed.

I recommend trying Safari Technology Preview or Safari 15 beta.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>