1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:07:34 +00:00

LibWeb: Move passing of Web object prototypes out of constructors

This commit is contained in:
Timothy Flynn 2023-01-10 06:56:59 -05:00 committed by Andreas Kling
parent 834202aeb9
commit af75493883
35 changed files with 157 additions and 23 deletions

View file

@ -18,11 +18,17 @@ MediaList* MediaList::create(JS::Realm& realm, NonnullRefPtrVector<MediaQuery>&&
}
MediaList::MediaList(JS::Realm& realm, NonnullRefPtrVector<MediaQuery>&& media)
: Bindings::LegacyPlatformObject(Bindings::ensure_web_prototype<Bindings::MediaListPrototype>(realm, "MediaList"))
: Bindings::LegacyPlatformObject(realm)
, m_media(move(media))
{
}
void MediaList::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::MediaListPrototype>(realm, "MediaList"));
}
// https://www.w3.org/TR/cssom-1/#dom-medialist-mediatext
DeprecatedString MediaList::media_text() const
{