mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
LibWeb: Move passing of Web object prototypes out of constructors
This commit is contained in:
parent
834202aeb9
commit
af75493883
35 changed files with 157 additions and 23 deletions
|
@ -11,12 +11,18 @@
|
|||
namespace Web::DOM {
|
||||
|
||||
NodeList::NodeList(JS::Realm& realm)
|
||||
: LegacyPlatformObject(Bindings::cached_web_prototype(realm, "NodeList"))
|
||||
: LegacyPlatformObject(realm)
|
||||
{
|
||||
}
|
||||
|
||||
NodeList::~NodeList() = default;
|
||||
|
||||
void NodeList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NodeListPrototype>(realm, "NodeList"));
|
||||
}
|
||||
|
||||
JS::Value NodeList::item_value(size_t index) const
|
||||
{
|
||||
auto* node = item(index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue