1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

LibWeb: Add HTML::EventNames and UIEvents::EventNames

This commit is contained in:
Luke 2020-11-21 19:15:57 +00:00 committed by Andreas Kling
parent e68348298f
commit 9950270808
15 changed files with 271 additions and 19 deletions

View file

@ -41,6 +41,7 @@
#include <LibWeb/DOM/Node.h>
#include <LibWeb/DOM/ShadowRoot.h>
#include <LibWeb/DOM/Window.h>
#include <LibWeb/HTML/EventNames.h>
#include <LibWeb/UIEvents/MouseEvent.h>
namespace Web::DOM {
@ -199,7 +200,7 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr<
event->append_to_path(*target, target_override, related_target, touch_targets, false);
bool is_activation_event = is<UIEvents::MouseEvent>(*event) && event->type() == "click";
bool is_activation_event = is<UIEvents::MouseEvent>(*event) && event->type() == HTML::EventNames::click;
if (is_activation_event && target->activation_behaviour)
activation_target = target;