HTMLOptionsCollection.h [plain text]
#ifndef HTMLOptionsCollection_h
#define HTMLOptionsCollection_h
#include "HTMLCollection.h"
#include "HTMLSelectElement.h"
namespace WebCore {
class HTMLOptionElement;
typedef int ExceptionCode;
class HTMLOptionsCollection final : public HTMLCollection {
public:
static Ref<HTMLOptionsCollection> create(HTMLSelectElement&, CollectionType);
HTMLSelectElement& selectElement() { return downcast<HTMLSelectElement>(ownerNode()); }
const HTMLSelectElement& selectElement() const { return downcast<HTMLSelectElement>(ownerNode()); }
void add(HTMLElement*, HTMLElement* beforeElement, ExceptionCode&);
void add(HTMLElement*, int beforeIndex, ExceptionCode&);
void remove(int index);
void remove(HTMLOptionElement*);
int selectedIndex() const;
void setSelectedIndex(int);
void setLength(unsigned, ExceptionCode&);
private:
explicit HTMLOptionsCollection(HTMLSelectElement&);
};
}
SPECIALIZE_TYPE_TRAITS_HTMLCOLLECTION(HTMLOptionsCollection, SelectOptions)
#endif // HTMLOptionsCollection_h