HTMLPreElement.h 873 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2020, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/ARIA/Roles.h>
  8. #include <LibWeb/HTML/HTMLElement.h>
  9. #include <LibWeb/WebIDL/Types.h>
  10. namespace Web::HTML {
  11. class HTMLPreElement final : public HTMLElement {
  12. WEB_PLATFORM_OBJECT(HTMLPreElement, HTMLElement);
  13. JS_DECLARE_ALLOCATOR(HTMLPreElement);
  14. public:
  15. virtual ~HTMLPreElement() override;
  16. // https://www.w3.org/TR/html-aria/#el-pre
  17. virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::generic; }
  18. WebIDL::Long width() const;
  19. WebIDL::ExceptionOr<void> set_width(WebIDL::Long);
  20. private:
  21. HTMLPreElement(DOM::Document&, DOM::QualifiedName);
  22. virtual void initialize(JS::Realm&) override;
  23. virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
  24. };
  25. }