mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 12:45:08 +00:00
LibWeb: Add default values of URL and content type in document
As per this line in the specification: Unless stated otherwise, a document’s encoding is the utf-8 encoding, content type is "application/xml", URL is "about:blank", origin is an opaque origin, type is "xml", and its mode is "no-quirks". https://dom.spec.whatwg.org/#document
This commit is contained in:
parent
dcb21b0c3a
commit
1993ccb456
1 changed files with 2 additions and 2 deletions
|
@ -58,7 +58,7 @@ class Document
|
|||
public:
|
||||
using WrapperType = Bindings::DocumentWrapper;
|
||||
|
||||
static NonnullRefPtr<Document> create(const URL& url = {}) { return adopt(*new Document(url)); }
|
||||
static NonnullRefPtr<Document> create(const URL& url = "about:blank") { return adopt(*new Document(url)); }
|
||||
virtual ~Document() override;
|
||||
|
||||
void set_url(const URL& url) { m_url = url; }
|
||||
|
@ -261,7 +261,7 @@ private:
|
|||
RefPtr<Document> m_associated_inert_template_document;
|
||||
|
||||
String m_ready_state { "loading" };
|
||||
String m_content_type;
|
||||
String m_content_type { "application/xml" };
|
||||
|
||||
NonnullRefPtr<DOMImplementation> m_implementation;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue