1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:27:35 +00:00

LibWeb: Implement Window.scroll{X,Y} JS properties

...and pageXOffset/pageYOffset too, since those are just aliases for the
same thing.
This commit is contained in:
Sam Atkins 2021-09-08 12:22:28 +01:00 committed by Linus Groh
parent 83414af9f3
commit 9588a377ec
3 changed files with 35 additions and 0 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -72,6 +73,9 @@ private:
JS_DECLARE_NATIVE_FUNCTION(parent_getter);
JS_DECLARE_NATIVE_GETTER(scroll_x_getter);
JS_DECLARE_NATIVE_GETTER(scroll_y_getter);
JS_DECLARE_NATIVE_FUNCTION(alert);
JS_DECLARE_NATIVE_FUNCTION(confirm);
JS_DECLARE_NATIVE_FUNCTION(prompt);