mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
CodeGenerators: Add support for LegacyNoInterfaceObject IDL attribute
When applied, corresponding interface object will not be exposed on the global object, e.g. for the following IDL: ``` Exposed=(Window,Worker), LegacyNoInterfaceObject] interface ANGLE_instanced_arrays { }; ``` executing `"ANGLE_instanced_arrays" in window` will return `false`.
This commit is contained in:
parent
3365cae4a9
commit
99b49a5978
Notes:
github-actions[bot]
2024-12-20 14:32:58 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 99b49a5978
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2990
1 changed files with 3 additions and 0 deletions
|
@ -309,6 +309,9 @@ void add_@global_object_snake_name@_exposed_interfaces(JS::Object& global)
|
|||
if (interface.is_namespace) {
|
||||
add_namespace(gen, interface.name, interface.namespace_class);
|
||||
} else if (!interface.extended_attributes.contains("LegacyNamespace"sv)) {
|
||||
if (interface.extended_attributes.contains("LegacyNoInterfaceObject")) {
|
||||
continue;
|
||||
}
|
||||
if (class_name == "Window") {
|
||||
add_interface(gen, interface.namespaced_name, interface.prototype_class, lookup_legacy_constructor(interface), interface.extended_attributes.get("LegacyWindowAlias"sv));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue