mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17: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
|
@ -26,7 +26,7 @@ CSSRuleList* CSSRuleList::create(JS::Realm& realm, JS::MarkedVector<CSSRule*> co
|
|||
}
|
||||
|
||||
CSSRuleList::CSSRuleList(JS::Realm& realm)
|
||||
: Bindings::LegacyPlatformObject(Bindings::ensure_web_prototype<Bindings::CSSRuleListPrototype>(realm, "CSSRuleList"))
|
||||
: Bindings::LegacyPlatformObject(realm)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,12 @@ CSSRuleList* CSSRuleList::create_empty(JS::Realm& realm)
|
|||
return realm.heap().allocate<CSSRuleList>(realm, realm);
|
||||
}
|
||||
|
||||
void CSSRuleList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSRuleListPrototype>(realm, "CSSRuleList"));
|
||||
}
|
||||
|
||||
void CSSRuleList::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue