diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp index 2bfa3b1326..8f979aa75f 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp @@ -2393,6 +2393,7 @@ void generate_prototype_implementation(IDL::Interface const& interface) #include #include #include +#include #include #if __has_include() @@ -2597,6 +2598,9 @@ static JS::ThrowCompletionOr<@fully_qualified_name@*> impl_from(JS::VM& vm) if (is(this_object)) { return static_cast(this_object); } + if (is(this_object)) { + return static_cast(this_object)->window().ptr(); + } )~~~"); }