mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:47:35 +00:00
LibWeb: Implement Window.scroll() and Window.scrollBy() JS methods
... and `Window.scrollTo()`, which is an alias for `scroll()`. There is still work that needs to be done here, regarding bringing the scroll position calculation in line with the spec. Currently we get the viewport rect from outside, and treat it as if it was the result of calculating steps 5-9 of the `scroll()` method. But it works. :^)
This commit is contained in:
parent
9588a377ec
commit
57371f7608
2 changed files with 154 additions and 0 deletions
|
@ -75,6 +75,8 @@ private:
|
|||
|
||||
JS_DECLARE_NATIVE_GETTER(scroll_x_getter);
|
||||
JS_DECLARE_NATIVE_GETTER(scroll_y_getter);
|
||||
JS_DECLARE_NATIVE_FUNCTION(scroll);
|
||||
JS_DECLARE_NATIVE_FUNCTION(scroll_by);
|
||||
|
||||
JS_DECLARE_NATIVE_FUNCTION(alert);
|
||||
JS_DECLARE_NATIVE_FUNCTION(confirm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue