Attribute.h 545 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/FlyString.h>
  8. namespace Web {
  9. class Attribute {
  10. public:
  11. Attribute(const FlyString& name, const String& value)
  12. : m_name(name)
  13. , m_value(value)
  14. {
  15. }
  16. const FlyString& name() const { return m_name; }
  17. const String& value() const { return m_value; }
  18. void set_value(const String& value) { m_value = value; }
  19. private:
  20. FlyString m_name;
  21. String m_value;
  22. };
  23. }