summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Bindings
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-18 12:02:28 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-18 12:18:29 +0100
commitfd83918476dd4d91a07df44c831275f0b5cdd7e9 (patch)
treea7d858053f7bc262a820fe8eb069b61a7ddf58b2 /Userland/Libraries/LibWeb/Bindings
parent630cbc947a511a90bdb1664957354ee6a45cb3c5 (diff)
downloadserenity-fd83918476dd4d91a07df44c831275f0b5cdd7e9.zip
LibWeb: Move IDL attributes and functions to the prototype
Instead of each IDL interface wrapper having its own set of all the attributes and functions, they are moved to the prototype. This matches what we already do in LibJS. Also, this should be spec compliant with the web as well, though there may be *some* content out there that expects some things to be directly on the wrapper since that's how things used to work in major browsers a long time ago. But let's just not worry about that for now. More work towards #4789
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings')
-rw-r--r--Userland/Libraries/LibWeb/Bindings/WindowObject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.h b/Userland/Libraries/LibWeb/Bindings/WindowObject.h
index 29d80a196c..29b36de544 100644
--- a/Userland/Libraries/LibWeb/Bindings/WindowObject.h
+++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.h
@@ -75,7 +75,7 @@ public:
return *it->value;
auto* constructor = heap().allocate<T>(*this, *this);
m_constructors.set(class_name, constructor);
- define_property(class_name, constructor, JS::Attribute::Writable | JS::Attribute::Configurable);
+ define_property(class_name, JS::Value(constructor), JS::Attribute::Writable | JS::Attribute::Configurable);
return *constructor;
}