[Webkit-unassigned] [Bug 226434] New: window.scroll(null) throws an exception
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun May 30 06:01:25 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=226434
Bug ID: 226434
Summary: window.scroll(null) throws an exception
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKitGTK
Assignee: webkit-unassigned at lists.webkit.org
Reporter: zyscoder at gmail.com
CC: bugs-noreply at webkitgtk.org
Steps to reproduce:
(1) Open a tab and navigate to https://www.icann.org/;
(2) Run the following code in the Console of Devtools:
```
window.scrollTo(null);
```
(3) Then this code would throw an exception.
Actual results:
This code would throw an exception: `TypeError: null is not an object (evaluating 'arguments[0].left')`
Expected results:
As https://drafts.csswg.org/cssom-view/#dom-window-scroll says,
```
If invoked with one argument, follow these substeps:
- Let options be the argument.
- Let x/y be the value of the left/top dictionary member of options, if present, or the viewport’s current scroll position on the x/y axis otherwise.
```
It seems reasonable to let x/y be the value of the viewport’s current scroll position on the x/y axis and no need to throw any exceptions for this code.
In my test, Chrome and Firefox would not throw any exceptions when evaluating this code.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210530/668b61fc/attachment-0001.htm>
More information about the webkit-unassigned
mailing list