summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/SubmitEvent.h
blob: d8cbcd72469f5b2b9b572c8e5900004fb2bee00f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (c) 2020, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibWeb/DOM/Event.h>

namespace Web::HTML {

class SubmitEvent final : public DOM::Event {
public:
    using WrapperType = Bindings::SubmitEventWrapper;

    static NonnullRefPtr<SubmitEvent> create(const FlyString& event_name, RefPtr<HTMLElement> submitter);

    virtual ~SubmitEvent() override;

    RefPtr<HTMLElement> submitter() const;

private:
    SubmitEvent(const FlyString& event_name, RefPtr<HTMLElement> submitter);

    RefPtr<HTMLElement> m_submitter;
};

}