LibWeb: Remove document_setter from Window.document

It is readonly: https://html.spec.whatwg.org/multipage/window-object.html#the-window-object:dom-document-2
This commit is contained in:
Luke 2021-04-04 00:49:19 +01:00 committed by Andreas Kling
parent e193cb0f11
commit 4fa59baafe
Notes: sideshowbarker 2024-07-18 20:49:43 +09:00
2 changed files with 1 additions and 7 deletions

View file

@ -66,7 +66,7 @@ void WindowObject::initialize_global_object()
define_property("window", this, JS::Attribute::Enumerable);
define_property("frames", this, JS::Attribute::Enumerable);
define_property("self", this, JS::Attribute::Enumerable);
define_native_property("document", document_getter, document_setter, JS::Attribute::Enumerable);
define_native_property("document", document_getter, nullptr, JS::Attribute::Enumerable);
define_native_property("performance", performance_getter, nullptr, JS::Attribute::Enumerable);
define_native_property("screen", screen_getter, nullptr, JS::Attribute::Enumerable);
define_native_property("innerWidth", inner_width_getter, nullptr, JS::Attribute::Enumerable);
@ -360,11 +360,6 @@ JS_DEFINE_NATIVE_GETTER(WindowObject::document_getter)
return wrap(global_object, impl->document());
}
JS_DEFINE_NATIVE_SETTER(WindowObject::document_setter)
{
// FIXME: Figure out what we should do here. Just ignore attempts to set window.document for now.
}
JS_DEFINE_NATIVE_GETTER(WindowObject::performance_getter)
{
auto* impl = impl_from(vm, global_object);

View file

@ -79,7 +79,6 @@ private:
virtual void visit_edges(Visitor&) override;
JS_DECLARE_NATIVE_GETTER(document_getter);
JS_DECLARE_NATIVE_SETTER(document_setter);
JS_DECLARE_NATIVE_GETTER(performance_getter);
JS_DECLARE_NATIVE_GETTER(screen_getter);