LibWeb: Allow ArrayBuffer attributes to be used in IDL

The FileReader IDL has the following entry:
```
readonly attribute (DOMString or ArrayBuffer)? result;
```

This change supports the use ArrayBuffer as a JS built-in in this
definition.
This commit is contained in:
Shannon Booth 2023-09-09 13:23:38 +12:00 committed by Andrew Kaster
parent 132b17406b
commit e123492470
Notes: sideshowbarker 2024-07-17 05:03:11 +09:00

View File

@ -131,6 +131,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 (is_javascript_builtin(type))
return { .name = DeprecatedString::formatted("JS::Handle<JS::{}>", 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 };