1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:38:10 +00:00

LibWeb: Use standardized encoding names, add encoding attribute to document

This commit is contained in:
Luke 2020-11-13 11:16:28 +00:00 committed by Andreas Kling
parent f3d2053bff
commit ed2689c00a
5 changed files with 20 additions and 5 deletions

View file

@ -199,6 +199,14 @@ public:
const String& content_type() const { return m_content_type; }
void set_content_type(const String& content_type) { m_content_type = content_type; }
const String& encoding() const { return m_encoding; }
void set_encoding(const String& encoding) { m_encoding = encoding; }
// NOTE: These are intended for the JS bindings
const String& character_set() const { return encoding(); }
const String& charset() const { return encoding(); }
const String& input_encoding() const { return encoding(); }
const NonnullRefPtr<DOMImplementation> implementation() { return m_implementation; }
private:
@ -262,6 +270,7 @@ private:
String m_ready_state { "loading" };
String m_content_type { "application/xml" };
String m_encoding { "UTF-8" };
NonnullRefPtr<DOMImplementation> m_implementation;
};