HTMLFormControlsCollection.h 845 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2023, Shannon Booth <shannon@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/DOM/HTMLCollection.h>
  8. #include <LibWeb/DOM/RadioNodeList.h>
  9. namespace Web::DOM {
  10. class HTMLFormControlsCollection : public HTMLCollection {
  11. WEB_PLATFORM_OBJECT(HTMLFormControlsCollection, HTMLCollection);
  12. public:
  13. [[nodiscard]] static JS::NonnullGCPtr<HTMLFormControlsCollection> create(ParentNode& root, Scope, Function<bool(Element const&)> filter);
  14. virtual ~HTMLFormControlsCollection() override;
  15. Variant<Empty, Element*, JS::Handle<RadioNodeList>> named_item_or_radio_node_list(FlyString const& name);
  16. protected:
  17. virtual void initialize(JS::Realm&) override;
  18. private:
  19. HTMLFormControlsCollection(ParentNode& root, Scope, Function<bool(Element const&)> filter);
  20. };
  21. }