mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
LibWeb: Add class to represent "list of available images" from HTML spec
This commit is contained in:
parent
596eabe9e6
commit
9281bf7a01
6 changed files with 158 additions and 0 deletions
|
@ -58,6 +58,7 @@
|
|||
#include <LibWeb/HTML/HTMLLinkElement.h>
|
||||
#include <LibWeb/HTML/HTMLScriptElement.h>
|
||||
#include <LibWeb/HTML/HTMLTitleElement.h>
|
||||
#include <LibWeb/HTML/ListOfAvailableImages.h>
|
||||
#include <LibWeb/HTML/Location.h>
|
||||
#include <LibWeb/HTML/MessageEvent.h>
|
||||
#include <LibWeb/HTML/Navigable.h>
|
||||
|
@ -330,6 +331,8 @@ JS::ThrowCompletionOr<void> Document::initialize(JS::Realm& realm)
|
|||
|
||||
m_selection = MUST_OR_THROW_OOM(heap().allocate<Selection::Selection>(realm, realm, *this));
|
||||
|
||||
m_list_of_available_images = TRY_OR_THROW_OOM(realm.vm(), try_make<HTML::ListOfAvailableImages>());
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -2567,4 +2570,14 @@ void Document::make_active()
|
|||
HTML::relevant_settings_object(window).execution_ready = true;
|
||||
}
|
||||
|
||||
HTML::ListOfAvailableImages& Document::list_of_available_images()
|
||||
{
|
||||
return *m_list_of_available_images;
|
||||
}
|
||||
|
||||
HTML::ListOfAvailableImages const& Document::list_of_available_images() const
|
||||
{
|
||||
return *m_list_of_available_images;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue