1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:57:44 +00:00

LibWeb: Add contentType attribute to Document

This commit is contained in:
Luke 2020-11-13 05:02:15 +00:00 committed by Andreas Kling
parent cf9419fc4f
commit 3ec54448f5
3 changed files with 21 additions and 10 deletions

View file

@ -194,6 +194,9 @@ public:
Window& window() { return *m_window; }
const String& content_type() const { return m_content_type; }
void set_content_type(const String& content_type) { m_content_type = content_type; }
private:
explicit Document(const URL&);
@ -254,6 +257,7 @@ private:
RefPtr<Document> m_associated_inert_template_document;
String m_ready_state { "loading" };
String m_content_type;
};
}

View file

@ -1,5 +1,7 @@
interface Document : Node {
readonly attribute DOMString contentType;
Element? getElementById(DOMString id);
Element? querySelector(DOMString selectors);
ArrayFromVector getElementsByTagName(DOMString tagName);