HTMLOptionsCollection.cpp [plain text]
#include "config.h"
#include "HTMLOptionsCollection.h"
namespace WebCore {
HTMLOptionsCollection::HTMLOptionsCollection(HTMLSelectElement& select)
: CachedHTMLCollection<HTMLOptionsCollection, CollectionTypeTraits<SelectOptions>::traversalType>(select, SelectOptions)
{
}
Ref<HTMLOptionsCollection> HTMLOptionsCollection::create(HTMLSelectElement& select, CollectionType)
{
return adoptRef(*new HTMLOptionsCollection(select));
}
ExceptionOr<void> HTMLOptionsCollection::add(const OptionOrOptGroupElement& element, const std::optional<HTMLElementOrInt>& before)
{
return selectElement().add(element, before);
}
void HTMLOptionsCollection::remove(int index)
{
selectElement().remove(index);
}
int HTMLOptionsCollection::selectedIndex() const
{
return selectElement().selectedIndex();
}
void HTMLOptionsCollection::setSelectedIndex(int index)
{
selectElement().setSelectedIndex(index);
}
ExceptionOr<void> HTMLOptionsCollection::setLength(unsigned length)
{
return selectElement().setLength(length);
}
}