mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01: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:
parent
8a57b75969
commit
fbfd3e2538
|
|
@ -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"~~~(
|
||||
}
|
||||
)~~~");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user