SVGTextContentElement.h 755 B

1234567891011121314151617181920212223242526272829303132
  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. ByteString text_contents() const;
  18. protected:
  19. SVGTextContentElement(DOM::Document&, DOM::QualifiedName);
  20. virtual void initialize(JS::Realm&) override;
  21. };
  22. }