LibWeb: Set the UserNavigationInvolvement for UI initiated navigations
This commit is contained in:
parent
3441b37de5
commit
7576e9dcd2
Notes:
sideshowbarker
2024-07-17 03:35:24 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/7576e9dcd2 Pull-request: https://github.com/SerenityOS/serenity/pull/22850
1 changed files with 4 additions and 2 deletions
|
@ -57,14 +57,16 @@ void Page::set_focused_browsing_context(Badge<EventHandler>, HTML::BrowsingConte
|
|||
|
||||
void Page::load(const AK::URL& url)
|
||||
{
|
||||
(void)top_level_traversable()->navigate({ .url = url, .source_document = *top_level_traversable()->active_document() });
|
||||
(void)top_level_traversable()->navigate({ .url = url, .source_document = *top_level_traversable()->active_document(), .user_involvement = HTML::UserNavigationInvolvement::BrowserUI });
|
||||
}
|
||||
|
||||
void Page::load_html(StringView html)
|
||||
{
|
||||
|
||||
(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() });
|
||||
.document_resource = String::from_utf8(html).release_value_but_fixme_should_propagate_errors(),
|
||||
.user_involvement = HTML::UserNavigationInvolvement::BrowserUI });
|
||||
}
|
||||
|
||||
Gfx::Palette Page::palette() const
|
||||
|
|
Loading…
Add table
Reference in a new issue