LibWeb/Bindings: Define constructor properties in the correct order

This commit is contained in:
Shannon Booth 2025-01-11 13:40:44 +13:00 committed by Tim Ledbetter
commit 627b7dd936
Notes: github-actions[bot] 2025-01-11 01:44:32 +00:00
8 changed files with 56 additions and 9 deletions

View file

@ -29,8 +29,9 @@ void OptionConstructor::initialize(JS::Realm& realm)
auto& vm = this->vm();
Base::initialize(realm);
define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLOptionElementPrototype>(realm, "HTMLOptionElement"_fly_string), 0);
define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
define_direct_property(vm.names.name, JS::PrimitiveString::create(vm, "Option"_string), JS::Attribute::Configurable);
define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLOptionElementPrototype>(realm, "HTMLOptionElement"_fly_string), 0);
}
JS::ThrowCompletionOr<JS::Value> OptionConstructor::call()