mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
LibWeb: Use struct to pass Navigable::navigate() params
Using structs makes the navigate() calls looks cleaner. No change in behavior is intended.
This commit is contained in:
parent
3e86f88d6a
commit
44f7d7406c
12 changed files with 56 additions and 34 deletions
|
@ -45,12 +45,14 @@ void Page::set_focused_browsing_context(Badge<EventHandler>, HTML::BrowsingConte
|
|||
|
||||
void Page::load(const AK::URL& url)
|
||||
{
|
||||
(void)top_level_traversable()->navigate(url, *top_level_traversable()->active_document());
|
||||
(void)top_level_traversable()->navigate({ .url = url, .source_document = *top_level_traversable()->active_document() });
|
||||
}
|
||||
|
||||
void Page::load_html(StringView html)
|
||||
{
|
||||
(void)top_level_traversable()->navigate("about:srcdoc"sv, *top_level_traversable()->active_document(), String::from_utf8(html).release_value_but_fixme_should_propagate_errors());
|
||||
(void)top_level_traversable()->navigate({ .url = "about:srcdoc"sv,
|
||||
.source_document = *top_level_traversable()->active_document(),
|
||||
.document_resource = String::from_utf8(html).release_value_but_fixme_should_propagate_errors() });
|
||||
}
|
||||
|
||||
Gfx::Palette Page::palette() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue