1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

LibWeb: Add PlatformObject class

This represents the "platform object" concept from the IDL spec, which
refers to an object that implements an IDL interface.
This commit is contained in:
Andreas Kling 2022-08-27 13:53:31 +02:00
parent 71c7ac3510
commit f6c61940f6
6 changed files with 70 additions and 10 deletions

View file

@ -972,7 +972,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
if (includes_wrappable_type) {
// 5. If V is a platform object, then:
union_generator.append(R"~~~(
if (is<Wrapper>(@js_name@@js_suffix@_object)) {
if (is<PlatformObject>(@js_name@@js_suffix@_object)) {
)~~~");
// 1. If types includes an interface type that V implements, then return the IDL value that is a reference to the object V.