1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:07:46 +00:00

LibWeb: Support returning a callback function in IDL

This commit is contained in:
Luke Wilde 2023-03-29 23:17:47 +01:00 committed by Andreas Kling
parent 5b906d9a40
commit 686e3a0d94

View file

@ -122,6 +122,9 @@ CppType idl_type_name_to_cpp_type(Type const& type, Interface const& interface)
if (is_platform_object(type))
return { .name = DeprecatedString::formatted("JS::Handle<{}>", type.name()), .sequence_storage_type = SequenceStorageType::MarkedVector };
if (interface.callback_functions.contains(type.name()))
return { .name = "JS::Handle<WebIDL::CallbackType>", .sequence_storage_type = SequenceStorageType::MarkedVector };
if (type.is_string()) {
if (interface.extended_attributes.contains("UseNewAKString"))
return { .name = "String", .sequence_storage_type = SequenceStorageType::Vector };