mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:37:44 +00:00
LibJS: Add define_direct_property and remove the define_property helper
This removes all usages of the non-standard define_property helper method and replaces all it's usages with the specification required alternative or with define_direct_property where appropriate.
This commit is contained in:
parent
e915155ca4
commit
a6b8291a9b
81 changed files with 246 additions and 275 deletions
|
@ -226,12 +226,12 @@
|
|||
#include <LibWeb/Bindings/XMLHttpRequestEventTargetPrototype.h>
|
||||
#include <LibWeb/Bindings/XMLHttpRequestPrototype.h>
|
||||
|
||||
#define ADD_WINDOW_OBJECT_CONSTRUCTOR_AND_PROTOTYPE(interface_name, constructor_name, prototype_name) \
|
||||
{ \
|
||||
auto& constructor = ensure_web_constructor<constructor_name>(#interface_name); \
|
||||
constructor.define_property(vm.names.name, js_string(vm, #interface_name), JS::Attribute::Configurable); \
|
||||
auto& prototype = ensure_web_prototype<prototype_name>(#interface_name); \
|
||||
prototype.define_property(vm.names.constructor, &constructor, JS::Attribute::Writable | JS::Attribute::Configurable); \
|
||||
#define ADD_WINDOW_OBJECT_CONSTRUCTOR_AND_PROTOTYPE(interface_name, constructor_name, prototype_name) \
|
||||
{ \
|
||||
auto& constructor = ensure_web_constructor<constructor_name>(#interface_name); \
|
||||
constructor.define_direct_property(vm.names.name, js_string(vm, #interface_name), JS::Attribute::Configurable); \
|
||||
auto& prototype = ensure_web_prototype<prototype_name>(#interface_name); \
|
||||
prototype.define_direct_property(vm.names.constructor, &constructor, JS::Attribute::Writable | JS::Attribute::Configurable); \
|
||||
}
|
||||
|
||||
#define ADD_WINDOW_OBJECT_INTERFACE(interface_name) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue