mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 00:56:39 +00:00
LibWeb: Use prototype and constructor methods from new Intrinsics
This will let us remove the helpers from Window that simply defer to the Intrinsics that are hanging off the [[HostDefined]] slot on the realm
This commit is contained in:
parent
beb3519a49
commit
f1367e0e4c
Notes:
sideshowbarker
2024-07-17 06:27:53 +09:00
Author: https://github.com/ADKaster
Commit: f1367e0e4c
Pull-request: https://github.com/SerenityOS/serenity/pull/15349
Reviewed-by: https://github.com/linusg ✅
10 changed files with 19 additions and 31 deletions
|
@ -23,10 +23,9 @@ OptionConstructor::OptionConstructor(JS::Realm& realm)
|
|||
void OptionConstructor::initialize(JS::Realm& realm)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
auto& window = verify_cast<HTML::Window>(realm.global_object());
|
||||
NativeFunction::initialize(realm);
|
||||
|
||||
define_direct_property(vm.names.prototype, &window.cached_web_prototype("HTMLOptionElement"), 0);
|
||||
NativeFunction::initialize(realm);
|
||||
define_direct_property(vm.names.prototype, &cached_web_prototype(realm, "HTMLOptionElement"), 0);
|
||||
define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue