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:
parent
8a57b75969
commit
fbfd3e2538
Notes:
github-actions[bot]
2025-05-08 09:36:48 +00:00
Author: https://github.com/alimpfard
Commit: fbfd3e2538
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4567
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue