mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibWeb: Expose the location object via Document.location
Both Window.location and Document.location use the same instance of the Location object. Some sites use it via Window, some via Document.
This commit is contained in:
committed by
Andreas Kling
parent
ee5bac0891
commit
678dd2d180
@@ -842,6 +842,11 @@ static void generate_return_statement(SourceGenerator& generator, IDL::Type cons
|
||||
return JS::js_null();
|
||||
|
||||
return retval.callback.cell();
|
||||
)~~~");
|
||||
} else if (return_type.name == "Location") {
|
||||
// Location is special cased as it is already a JS::Object.
|
||||
scoped_generator.append(R"~~~(
|
||||
return JS::Value(retval);
|
||||
)~~~");
|
||||
} else {
|
||||
scoped_generator.append(R"~~~(
|
||||
@@ -1440,6 +1445,7 @@ void generate_prototype_implementation(IDL::Interface const& interface)
|
||||
#include <LibWeb/Bindings/HTMLTableCaptionElementWrapper.h>
|
||||
#include <LibWeb/Bindings/HTMLTableSectionElementWrapper.h>
|
||||
#include <LibWeb/Bindings/ImageDataWrapper.h>
|
||||
#include <LibWeb/Bindings/LocationObject.h>
|
||||
#include <LibWeb/Bindings/NodeWrapperFactory.h>
|
||||
#include <LibWeb/Bindings/PerformanceTimingWrapper.h>
|
||||
#include <LibWeb/Bindings/RangeWrapper.h>
|
||||
|
||||
Reference in New Issue
Block a user