mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 00:23:00 +00:00
LibWeb: Add FrameLoader::load_html()
This moves responsibility for parsing and loading the document from InProcessWebView to FrameLoader, so can be re-used easily.
This commit is contained in:
parent
e49ea1b520
commit
a2a603d38a
Notes:
sideshowbarker
2024-07-19 01:58:23 +09:00
Author: https://github.com/linusg
Commit: a2a603d38a
Pull-request: https://github.com/SerenityOS/serenity/pull/3727
3 changed files with 11 additions and 3 deletions
|
@ -364,9 +364,7 @@ void InProcessWebView::reload()
|
|||
|
||||
void InProcessWebView::load_html(const StringView& html, const URL& url)
|
||||
{
|
||||
HTML::HTMLDocumentParser parser(html, "utf-8");
|
||||
parser.run(url);
|
||||
set_document(&parser.document());
|
||||
page().main_frame().loader().load_html(html, url);
|
||||
}
|
||||
|
||||
bool InProcessWebView::load(const URL& url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue