1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

LibHTML: Start working on a simple HTML library.

I'd like to have rich text, and we might as well use HTML for that. :^)
This commit is contained in:
Andreas Kling 2019-06-15 18:55:47 +02:00
parent 01d1aee922
commit a67e823838
19 changed files with 329 additions and 0 deletions

30
LibHTML/Element.h Normal file
View file

@ -0,0 +1,30 @@
#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;
};