mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibWeb: Move IDLOverloadResolution from Bindings/ to WebIDL/
This commit is contained in:
parent
6480faacb6
commit
86f68eb3c3
4 changed files with 6 additions and 6 deletions
28
Userland/Libraries/LibWeb/WebIDL/OverloadResolution.h
Normal file
28
Userland/Libraries/LibWeb/WebIDL/OverloadResolution.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibIDL/Types.h>
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
|
||||
namespace Web::WebIDL {
|
||||
|
||||
struct ResolvedOverload {
|
||||
// Corresponds to "the special value “missing”" in the overload resolution algorithm.
|
||||
struct Missing { };
|
||||
using Argument = Variant<JS::Value, Missing>;
|
||||
|
||||
int callable_id;
|
||||
Vector<Argument> arguments;
|
||||
};
|
||||
|
||||
// https://webidl.spec.whatwg.org/#es-overloads
|
||||
JS::ThrowCompletionOr<ResolvedOverload> resolve_overload(JS::VM&, IDL::EffectiveOverloadSet&);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue