mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Move passing of Web object prototypes out of constructors
This commit is contained in:
parent
834202aeb9
commit
af75493883
Notes:
sideshowbarker
2024-07-17 01:51:06 +09:00
Author: https://github.com/trflynn89
Commit: af75493883
Pull-request: https://github.com/SerenityOS/serenity/pull/16945
Reviewed-by: https://github.com/alimpfard
35 changed files with 157 additions and 23 deletions
|
@ -52,11 +52,17 @@ StyleSheetList* StyleSheetList::create(DOM::Document& document)
|
|||
}
|
||||
|
||||
StyleSheetList::StyleSheetList(DOM::Document& document)
|
||||
: Bindings::LegacyPlatformObject(Bindings::ensure_web_prototype<Bindings::StyleSheetListPrototype>(document.realm(), "StyleSheetList"))
|
||||
: Bindings::LegacyPlatformObject(document.realm())
|
||||
, m_document(document)
|
||||
{
|
||||
}
|
||||
|
||||
void StyleSheetList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::StyleSheetListPrototype>(realm, "StyleSheetList"));
|
||||
}
|
||||
|
||||
void StyleSheetList::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue