mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
LibWeb: Stub out Element.scroll() and Element.scrollTo()
With this, we stop throwing exceptions in a way that makes MDN disappear and it's now possible to browse MDN in Ladybird. :^)
This commit is contained in:
parent
7f90b0cab7
commit
dd2080c55f
3 changed files with 21 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <LibWeb/HTML/EventLoop/Task.h>
|
||||
#include <LibWeb/HTML/ScrollOptions.h>
|
||||
#include <LibWeb/HTML/TagNames.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::DOM {
|
||||
|
@ -306,6 +307,9 @@ public:
|
|||
void set_custom_element_state(CustomElementState value) { m_custom_element_state = value; }
|
||||
void setup_custom_element_from_constructor(HTML::CustomElementDefinition& custom_element_definition, Optional<String> const& is_value);
|
||||
|
||||
void scroll(HTML::ScrollToOptions const&);
|
||||
void scroll(double x, double y);
|
||||
|
||||
protected:
|
||||
Element(Document&, DOM::QualifiedName);
|
||||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue