summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/EventHandler.h
blob: 29bf3b9c58188b0e9c0c0fdd80fe15184d2e53bb (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
30
31
32
33
34
/*
 * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/String.h>
#include <LibJS/Heap/Handle.h>
#include <LibJS/Runtime/Function.h>

namespace Web::HTML {

struct EventHandler {
    EventHandler()
    {
    }

    EventHandler(String s)
        : string(move(s))
    {
    }

    EventHandler(JS::Handle<JS::Function> c)
        : callback(move(c))
    {
    }

    String string;
    JS::Handle<JS::Function> callback;
};

}