/* * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Web::HTML { using HTMLOptionOrOptGroupElement = Variant, JS::Handle>; using HTMLElementOrElementIndex = Variant, i32>; class HTMLOptionsCollection final : public DOM::HTMLCollection { WEB_PLATFORM_OBJECT(HTMLOptionsCollection, DOM::HTMLCollection); public: static JS::NonnullGCPtr create(DOM::ParentNode& root, Function filter); virtual ~HTMLOptionsCollection() override; WebIDL::ExceptionOr add(HTMLOptionOrOptGroupElement element, Optional before = {}); private: HTMLOptionsCollection(DOM::ParentNode& root, Function filter); }; }