mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:08:11 +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
|
@ -17,13 +17,19 @@ JS::NonnullGCPtr<FileList> FileList::create(JS::Realm& realm, Vector<JS::Nonnull
|
|||
}
|
||||
|
||||
FileList::FileList(JS::Realm& realm, Vector<JS::NonnullGCPtr<File>>&& files)
|
||||
: Bindings::LegacyPlatformObject(Bindings::cached_web_prototype(realm, "FileList"))
|
||||
: Bindings::LegacyPlatformObject(realm)
|
||||
, m_files(move(files))
|
||||
{
|
||||
}
|
||||
|
||||
FileList::~FileList() = default;
|
||||
|
||||
void FileList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FileListPrototype>(realm, "FileList"));
|
||||
}
|
||||
|
||||
// https://w3c.github.io/FileAPI/#dfn-item
|
||||
bool FileList::is_supported_property_index(u32 index) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue