LibWeb/IDL: Add support for returning JS::Object from IDL functions

This commit is contained in:
Luke Wilde 2022-06-04 04:07:19 +01:00 committed by Linus Groh
parent a9a9614b6b
commit df2c0588ea
Notes: sideshowbarker 2024-07-17 10:16:24 +09:00

View file

@ -1501,6 +1501,10 @@ static void generate_wrap_statement(SourceGenerator& generator, String const& va
dictionary_generator.append(R"~~~(
@result_expression@ dictionary_object@recursion_depth@;
)~~~");
} else if (type.name == "object") {
scoped_generator.append(R"~~~(
@result_expression@ JS::Value(const_cast<JS::Object*>(@value@));
)~~~");
} else {
if (wrapping_reference == WrappingReference::No) {