mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
34 lines
528 B
C++
34 lines
528 B
C++
/*
|
|
* 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/FunctionObject.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
struct EventHandler {
|
|
EventHandler()
|
|
{
|
|
}
|
|
|
|
EventHandler(String s)
|
|
: string(move(s))
|
|
{
|
|
}
|
|
|
|
EventHandler(JS::Handle<JS::FunctionObject> c)
|
|
: callback(move(c))
|
|
{
|
|
}
|
|
|
|
String string;
|
|
JS::Handle<JS::FunctionObject> callback;
|
|
};
|
|
|
|
}
|