HTMLTableElement.h 995 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/DOM/ExceptionOr.h>
  8. #include <LibWeb/HTML/HTMLElement.h>
  9. #include <LibWeb/HTML/HTMLTableCaptionElement.h>
  10. #include <LibWeb/HTML/HTMLTableRowElement.h>
  11. namespace Web::HTML {
  12. class HTMLTableElement final : public HTMLElement {
  13. public:
  14. using WrapperType = Bindings::HTMLTableElementWrapper;
  15. HTMLTableElement(DOM::Document&, QualifiedName);
  16. virtual ~HTMLTableElement() override;
  17. RefPtr<HTMLTableCaptionElement> caption();
  18. void set_caption(HTMLTableCaptionElement&);
  19. NonnullRefPtr<HTMLTableCaptionElement> create_caption();
  20. void delete_caption();
  21. NonnullRefPtr<DOM::HTMLCollection> rows();
  22. DOM::ExceptionOr<NonnullRefPtr<HTMLTableRowElement>> insert_row(long index);
  23. DOM::ExceptionOr<void> delete_row(long index);
  24. private:
  25. virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
  26. };
  27. }