2020-09-06 14:28:41 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-09-06 14:28:41 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/Forward.h>
|
2021-01-21 20:55:37 +01:00
|
|
|
#include <LibWeb/DOM/Event.h>
|
2020-09-06 14:28:41 +02:00
|
|
|
#include <LibWeb/Forward.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::DOM {
|
|
|
|
|
|
|
|
|
|
class EventDispatcher {
|
|
|
|
|
public:
|
2022-08-28 13:42:07 +02:00
|
|
|
static bool dispatch(JS::NonnullGCPtr<EventTarget>, Event&, bool legacy_target_override = false);
|
2020-11-21 18:32:39 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static void invoke(Event::PathEntry&, Event&, Event::Phase);
|
2022-08-08 14:12:01 +02:00
|
|
|
static bool inner_invoke(Event&, Vector<JS::Handle<DOM::DOMEventListener>>&, Event::Phase, bool);
|
2020-09-06 14:28:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|