mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
LibWeb: Attach DOM::Document to its frame before parsing
FrameLoader now begins by constructing a DOM::Document, and then builds a document tree inside it based on the MIME type. For text/html we pass control to the HTMLDocumentParser as before. This gives us access to things like window.alert() during parsing. Fixes #3973.
This commit is contained in:
parent
22c582a887
commit
1eee6716e0
3 changed files with 59 additions and 54 deletions
|
@ -58,7 +58,7 @@ private:
|
|||
virtual void resource_did_fail() override;
|
||||
|
||||
void load_error_page(const URL& failed_url, const String& error_message);
|
||||
RefPtr<DOM::Document> create_document_from_mime_type(const ByteBuffer&, const URL&, const String& mime_type, const String& encoding);
|
||||
bool parse_document(DOM::Document&, const ByteBuffer& data);
|
||||
|
||||
Frame& m_frame;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue