Interface INavigation
- Namespace
- DotNetBrowser.Navigation
- Assembly
- DotNetBrowser.dll
Allows loading resources in the browser instance and working with the navigation history.
public interface INavigation : IAutoDisposable
- Inherited Members
Properties
- CurrentEntry
Gets the current navigation item in the back-forward list.
- CurrentIndex
Gets the index of the current navigation item in the back-forward list.
- EntryCount
Gets the number of items in the back-forward list.
- ShowHttpErrorPageHandler
Gets or sets a handler that is used when the engine is about to display an error web page because the web server sends an empty HTTP response with the HTTP status code that represents an error.
- ShowNetErrorPageHandler
Gets or sets a handler that is used when the engine is about to display a network error web page because the required web resource cannot be loaded because of a network error.
- StartNavigationHandler
Gets or sets a handler that is used before the browser starts navigation to a resource.
Methods
- CanGoBack()
Checks whether the previous location can be loaded.
- CanGoForward()
Checks whether the next location can be loaded.
- EntryAt(int)
Returns an INavigationEntry instance for the given
index
in the back-forward list.
- GoBack()
Loads the previous location in the back-forward list. It does nothing if there's no previous location in the list.
- GoForward()
Loads the next location in the back-forward list. It does nothing if there's no next location in the list.
- GoTo(int)
Navigates to a specific location at the given
index
in the back-forward list.
- LoadUrl(LoadUrlParameters)
Navigates to a resource identified by the specified
parameters
- LoadUrl(LoadUrlParameters, TimeSpan)
Navigates to a resource identified by the given LoadUrlParameters, with the specified timout.
- LoadUrl(string)
Navigates to a resource identified by a URL.
- LoadUrl(string, TimeSpan)
Navigates to a resource identified by a URL, with the specified
timeout
.
- Reload()
Reloads the currently loaded web page.
- ReloadAndCheckForRepost()
Reloads the currently loaded web page. If the current web page has POST data, the user will be asked to confirm that he really wants to reload the page.
- ReloadIgnoringCache()
Reloads the currently loaded web page ignoring the cached data.
- ReloadIgnoringCacheAndCheckForRepost()
Reloads the currently loaded web page ignoring the cached data. If the current web page has POST data, the user will be asked to confirm that he really wants to reload the page.
- RemoveEntryAt(int)
Removes the item at the given
index
from the back-forward list and returns true if it was removed successfully.
- Stop()
Cancels any pending navigation or download operation and stops any dynamic page elements, such as background sounds and animations.
Events
- FrameDocumentLoadFinished
Occurs when the document loading in the given IFrame has been finished. At this point, deferred scripts were executed, and content scripts marked "document_end" get injected into the IFrame.
- FrameLoadFailed
Occurs when the content load was failed.
- FrameLoadFinished
Occurs when the content of the IFrame has been loaded completely.
- LoadFinished
Occurs when the content loading has been finished. This event corresponds to the moment when the spinner of the tab stops spinning.
- LoadProgressChanged
Occurs when the page has made some progress loading.
- LoadStarted
Occurs when the content loading has been started. This event corresponds to the moment when the spinner of the tab starts spinning.
- NavigationFinished
Occurs when the navigation has been finished. This happens when a navigation is committed, aborted, or replaced by a new one.
- NavigationRedirected
Occurs when the navigation has encountered a server redirect.
- NavigationStarted
Occurs when the navigation has been started. This is also fired by same-document navigations, such as fragment navigations or pushState/replaceState, which will not result in a document change. To filter these out, use the IsSameDocument property.
Note that more than one navigation can be ongoing in the same frame at the same time(including the main frame). Also, there is no guarantee that the NavigationFinished will be fired for any particular navigation before this event is called on the next.
- NavigationStopped
Occurs when the navigation has been stopped.