1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

IDLGenerators: Add an 'WithInitializer' attribute for an init hook

This is needed for WebAssembly.*Error (at least), which apparently
cannot be defined in webidl.
This commit is contained in:
Ali Mohammad Pur 2025-05-03 12:03:36 +03:30 committed by Andrew Kaster
parent 8a57b75969
commit fbfd3e2538
Notes: github-actions[bot] 2025-05-08 09:36:48 +00:00

View file

@ -4824,6 +4824,13 @@ void @namespace_class@::initialize(JS::Realm& realm)
)~~~");
}
if (interface.extended_attributes.contains("WithInitializer"sv)) {
generator.append(R"~~~(
@name@::initialize(*this, realm);
)~~~");
}
generator.append(R"~~~(
}
)~~~");