mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Move passing of Web object prototypes out of constructors
This commit is contained in:
committed by
Andreas Kling
parent
834202aeb9
commit
af75493883
@@ -20,13 +20,19 @@ JS::NonnullGCPtr<DOMRectList> DOMRectList::create(JS::Realm& realm, Vector<JS::H
|
||||
}
|
||||
|
||||
DOMRectList::DOMRectList(JS::Realm& realm, Vector<JS::NonnullGCPtr<DOMRect>> rects)
|
||||
: Bindings::LegacyPlatformObject(Bindings::cached_web_prototype(realm, "DOMRectList"))
|
||||
: Bindings::LegacyPlatformObject(realm)
|
||||
, m_rects(move(rects))
|
||||
{
|
||||
}
|
||||
|
||||
DOMRectList::~DOMRectList() = default;
|
||||
|
||||
void DOMRectList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMRectListPrototype>(realm, "DOMRectList"));
|
||||
}
|
||||
|
||||
// https://drafts.fxtf.org/geometry-1/#dom-domrectlist-length
|
||||
u32 DOMRectList::length() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user