diff options
author | Luke <luke.wilde@live.co.uk> | 2021-04-04 00:49:19 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-04 16:13:38 +0200 |
commit | 4fa59baafeef50d08d3fcac25d3f7785616648cb (patch) | |
tree | 8c4c875b0e32f3a42954b831dd948b7022eaa235 /Userland/Libraries | |
parent | e193cb0f11ce13493fefb8f74fdb3d8bfb630358 (diff) | |
download | serenity-4fa59baafeef50d08d3fcac25d3f7785616648cb.zip |
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
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/WindowObject.cpp | 7 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/WindowObject.h | 1 |
2 files changed, 1 insertions, 7 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp index 6be2280f20..6c2cdee4fa 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp +++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp @@ -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); diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.h b/Userland/Libraries/LibWeb/Bindings/WindowObject.h index 962b65fd68..7c2deee1cf 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObject.h +++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.h @@ -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); |