1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

LibWeb: Implement HTMLElement.click()

This doesn't send the correct type of click event, but it does send
something, so it's already somewhat useful. :^)
This commit is contained in:
Andreas Kling 2022-02-15 00:25:51 +01:00
parent 1347c5032b
commit e842e955e5
3 changed files with 28 additions and 1 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -42,6 +42,8 @@ public:
void focus();
void click();
protected:
virtual void parse_attribute(const FlyString& name, const String& value) override;
@ -60,6 +62,9 @@ private:
// https://html.spec.whatwg.org/multipage/interaction.html#locked-for-focus
bool m_locked_for_focus { false };
// https://html.spec.whatwg.org/multipage/interaction.html#click-in-progress-flag
bool m_click_in_progress { false };
};
}