1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 01:34:58 +00:00

LibHTML: Optionally pass document URL to the HTML parser

This makes the document URL available to all the parse_attributes()
callbacks, in case they need it for anything.
This commit is contained in:
Andreas Kling 2019-10-06 21:13:24 +02:00
parent a239ef34d5
commit 66caa7af2b
3 changed files with 4 additions and 4 deletions

View file

@ -175,8 +175,7 @@ void HtmlView::load(const URL& url)
}
String html = String::copy(f->read_all());
auto document = parse_html(html);
document->set_url(url);
auto document = parse_html(html, url);
document->normalize();
set_document(document);