2020-09-06 14:28:41 +02:00
|
|
|
/*
|
2024-10-04 13:19:50 +02:00
|
|
|
* Copyright (c) 2020, Andreas Kling <andreas@ladybird.org>
|
2020-09-06 14:28:41 +02:00
|
|
|
*
|
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:
|
2024-11-15 04:01:23 +13:00
|
|
|
static bool dispatch(GC::Ref<EventTarget>, Event&, bool legacy_target_override = false);
|
2024-11-07 22:59:03 +01:00
|
|
|
static bool dispatch(GC::Ref<EventTarget>, Event&, bool legacy_target_override, bool& legacy_output_did_listeners_throw);
|
2020-11-21 18:32:39 +00:00
|
|
|
|
|
|
|
private:
|
2024-11-07 22:59:03 +01:00
|
|
|
static void invoke(Event::PathEntry&, Event&, Event::Phase, bool& legacy_output_did_listeners_throw);
|
|
|
|
static bool inner_invoke(Event&, Vector<GC::Root<DOM::DOMEventListener>>&, Event::Phase, bool, bool&);
|
2020-09-06 14:28:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|