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