SVGTextContentElement.h 739 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/SVG/AttributeParser.h>
  8. #include <LibWeb/SVG/SVGGraphicsElement.h>
  9. #include <LibWeb/WebIDL/ExceptionOr.h>
  10. namespace Web::SVG {
  11. // https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextContentElement
  12. class SVGTextContentElement : public SVGGraphicsElement {
  13. WEB_PLATFORM_OBJECT(SVGTextContentElement, SVGGraphicsElement);
  14. public:
  15. WebIDL::ExceptionOr<int> get_number_of_chars() const;
  16. Optional<TextAnchor> text_anchor() const;
  17. protected:
  18. SVGTextContentElement(DOM::Document&, DOM::QualifiedName);
  19. virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
  20. };
  21. }