mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Implement the ClipboardItem API
Spec: https://w3c.github.io/clipboard-apis/#clipboard-item-interface
This commit is contained in:
parent
bdd6729d78
commit
b3edbd7bf2
Notes:
github-actions[bot]
2024-12-20 15:30:21 +00:00
Author: https://github.com/F3n67u
Commit: b3edbd7bf2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2664
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/tcl3 ✅
12 changed files with 484 additions and 0 deletions
|
@ -45,6 +45,7 @@ static bool is_platform_object(Type const& type)
|
|||
"CanvasGradient"sv,
|
||||
"CanvasPattern"sv,
|
||||
"CanvasRenderingContext2D"sv,
|
||||
"ClipboardItem"sv,
|
||||
"CloseWatcher"sv,
|
||||
"CryptoKey"sv,
|
||||
"DataTransfer"sv,
|
||||
|
@ -247,6 +248,9 @@ CppType idl_type_name_to_cpp_type(Type const& type, Interface const& interface)
|
|||
if (type.name() == "Function")
|
||||
return { .name = "GC::Ref<WebIDL::CallbackType>", .sequence_storage_type = SequenceStorageType::MarkedVector };
|
||||
|
||||
if (type.name() == "Promise")
|
||||
return { .name = "GC::Root<WebIDL::Promise>", .sequence_storage_type = SequenceStorageType::MarkedVector };
|
||||
|
||||
if (type.name() == "sequence") {
|
||||
auto& parameterized_type = verify_cast<ParameterizedType>(type);
|
||||
auto& sequence_type = parameterized_type.parameters().first();
|
||||
|
@ -4663,6 +4667,7 @@ void generate_constructor_implementation(IDL::Interface const& interface, String
|
|||
#include <LibJS/Runtime/DataView.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/Iterator.h>
|
||||
#include <LibJS/Runtime/PromiseConstructor.h>
|
||||
#include <LibJS/Runtime/ValueInlines.h>
|
||||
#include <LibJS/Runtime/TypedArray.h>
|
||||
#include <LibWeb/Bindings/@constructor_class@.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue