1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 19:34:59 +00:00

LibHTML: Store the HTML parser input along with the created Document

This will allow us to "view source" later on, long after parsing has
finished and turned it into a DOM.
This commit is contained in:
Andreas Kling 2019-11-25 00:27:41 +01:00
parent f2d1e591b6
commit 5036b888ac
2 changed files with 6 additions and 0 deletions

View file

@ -334,6 +334,7 @@ RefPtr<Document> parse_html_document(const StringView& html, const URL& url)
{
auto document = adopt(*new Document);
document->set_url(url);
document->set_source(html);
if (!parse_html_document(html, *document, *document))
return nullptr;