mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
LibWeb: Support interfaces with the [Global] extended attribute
These are treated differently as the interface members are placed on the object itself, not its prototype. As the object itself still needs to be hand-written code, and we can no longer fully hide the gnarly generated code in the prototype object, these now generate a 'mixin' class that is added to the actual object through inheritance. https://webidl.spec.whatwg.org/#Global
This commit is contained in:
parent
de83f5422d
commit
3316d247bf
5 changed files with 639 additions and 443 deletions
|
@ -595,6 +595,7 @@ void Parser::parse_interface(Interface& interface)
|
|||
interface.constructor_class = DeprecatedString::formatted("{}Constructor", interface.name);
|
||||
interface.prototype_class = DeprecatedString::formatted("{}Prototype", interface.name);
|
||||
interface.prototype_base_class = DeprecatedString::formatted("{}Prototype", interface.parent_name.is_empty() ? "Object" : interface.parent_name);
|
||||
interface.global_mixin_class = DeprecatedString::formatted("{}GlobalMixin", interface.name);
|
||||
consume_whitespace();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue