pub struct WebHistory { /* private fields */ }Expand description
A dioxus_history::History provider that integrates with a browser via the History API.
§Prefix
This dioxus_history::History supports a prefix, which can be used for web apps that aren’t located
at the root of their domain.
Application developers are responsible for ensuring that right after the prefix comes a /. If
that is not the case, this dioxus_history::History will replace the first character after the prefix
with one.
Application developers are responsible for not rendering the router if the prefix is not present in the URL. Otherwise, if a router navigation is triggered, the prefix will be added.
Implementations§
Source§impl WebHistory
impl WebHistory
Sourcepub fn new(prefix: Option<String>, do_scroll_restoration: bool) -> Self
pub fn new(prefix: Option<String>, do_scroll_restoration: bool) -> Self
Create a new WebHistory.
If do_scroll_restoration is true, WebHistory will take control of the history
state. It’ll also set the browsers scroll restoration to manual.