mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +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:
committed by
Alexander Kalenik
parent
3365cae4a9
commit
99b49a5978
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user