1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-12 22:11:00 +00:00
serenity/LibHTML/Element.h
Andreas Kling a67e823838 LibHTML: Start working on a simple HTML library.
I'd like to have rich text, and we might as well use HTML for that. :^)
2019-06-15 18:55:47 +02:00

30 lines
521 B
C++

#pragma once
#include <LibHTML/ParentNode.h>
#include <AK/AKString.h>
class Attribute {
public:
Attribute(const String& name, const String& value)
: m_name(name)
, m_value(value)
{
}
private:
String m_name;
String m_value;
};
class Element : public ParentNode {
public:
explicit Element(const String& tag_name);
virtual ~Element() override;
const String& tag_name() const { return m_tag_name; }
private:
String m_tag_name;
Vector<Attribute> m_attributes;
};