mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb/Bindings: Define constructor properties in the correct order
This commit is contained in:
parent
3261f873c5
commit
627b7dd936
Notes:
github-actions[bot]
2025-01-11 01:44:32 +00:00
Author: https://github.com/shannonbooth
Commit: 627b7dd936
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3222
Reviewed-by: https://github.com/tcl3 ✅
8 changed files with 56 additions and 9 deletions
|
@ -26,8 +26,9 @@ void ImageConstructor::initialize(JS::Realm& realm)
|
|||
auto& vm = this->vm();
|
||||
Base::initialize(realm);
|
||||
|
||||
define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLImageElementPrototype>(realm, "HTMLImageElement"_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, "Image"_string), JS::Attribute::Configurable);
|
||||
define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLImageElementPrototype>(realm, "HTMLImageElement"_fly_string), 0);
|
||||
}
|
||||
|
||||
JS::ThrowCompletionOr<JS::Value> ImageConstructor::call()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue