LibWeb: Stub out Element.scrollBy()

This commit is contained in:
Andreas Kling 2024-04-14 17:31:37 +02:00
commit 0b28a310b1
Notes: sideshowbarker 2024-07-17 06:35:23 +09:00
3 changed files with 16 additions and 2 deletions

View file

@ -2130,6 +2130,18 @@ void Element::scroll(HTML::ScrollToOptions const&)
dbgln("FIXME: Implement Element::scroll(ScrollToOptions)");
}
// https://drafts.csswg.org/cssom-view/#dom-window-scrollby
void Element::scroll_by(double x, double y)
{
dbgln("FIXME: Implement Element::scroll_by({}, {})", x, y);
}
// https://drafts.csswg.org/cssom-view/#dom-window-scrollby
void Element::scroll_by(HTML::ScrollToOptions const&)
{
dbgln("FIXME: Implement Element::scroll_by(ScrollToOptions)");
}
bool Element::id_reference_exists(String const& id_reference) const
{
return document().get_element_by_id(id_reference);

View file

@ -336,6 +336,8 @@ public:
void scroll(HTML::ScrollToOptions const&);
void scroll(double x, double y);
void scroll_by(HTML::ScrollToOptions const&);
void scroll_by(double x, double y);
void register_intersection_observer(Badge<IntersectionObserver::IntersectionObserver>, IntersectionObserver::IntersectionObserverRegistration);
void unregister_intersection_observer(Badge<IntersectionObserver::IntersectionObserver>, JS::NonnullGCPtr<IntersectionObserver::IntersectionObserver>);

View file

@ -82,8 +82,8 @@ interface Element : Node {
undefined scroll(unrestricted double x, unrestricted double y);
[ImplementedAs=scroll] undefined scrollTo(optional ScrollToOptions options = {});
[ImplementedAs=scroll] undefined scrollTo(unrestricted double x, unrestricted double y);
// FIXME: undefined scrollBy(optional ScrollToOptions options = {});
// FIXME: undefined scrollBy(unrestricted double x, unrestricted double y);
undefined scrollBy(optional ScrollToOptions options = {});
undefined scrollBy(unrestricted double x, unrestricted double y);
attribute unrestricted double scrollTop;
attribute unrestricted double scrollLeft;
readonly attribute long scrollWidth;