Molybden API
Loading...
Searching...
No Matches
molybden::NavigationDelegates Class Reference

Objects implement this interface to get notified about changes in Navigation and to provide necessary functionality. More...

#include <navigation_delegates.hpp>

Inheritance diagram for molybden::NavigationDelegates:
molybden::Navigation

Public Attributes

Delegate< StartNavigationArgs, StartNavigationActiononStartNavigation
 Invoked when navigation to a resource is about to start.
 
Delegate< ShowHttpErrorPageArgs, ShowHttpErrorPageActiononShowHttpErrorPage
 Invoked when a network error web page is about to display, because the web server sends an empty HTTP response with the HTTP status code that represents an error.
 
Delegate< ShowNetErrorPageArgs, ShowNetErrorPageActiononShowNetErrorPage
 Invoked when a network error web page is about to display, because the required web resource cannot be loaded because of a network error.
 

Detailed Description

Objects implement this interface to get notified about changes in Navigation and to provide necessary functionality.

Member Data Documentation

◆ onShowHttpErrorPage

Delegate<ShowHttpErrorPageArgs, ShowHttpErrorPageAction> molybden::NavigationDelegates::onShowHttpErrorPage

Invoked when a network error web page is about to display, because the web server sends an empty HTTP response with the HTTP status code that represents an error.

Use ShowHttpErrorPageAction::ShowPage() to show the custom error page with the given HTML.

Use ShowHttpErrorPageAction::Default() to display the default Chromium error page.

Use the following approach to register a callback:

navigation->onShowHttpErrorPage = [](const ShowHttpErrorPageArgs& args, ShowHttpErrorPageAction action) {};
The NavigationDelegates::onShowHttpErrorPage action.
Definition navigation_delegates.hpp:88
The NavigationDelegates::onShowHttpErrorPage action arguments.
Definition navigation_delegates.hpp:68

In order to unregister the callback, use the reset() method:

navigation->onShowHttpErrorPage.reset();

◆ onShowNetErrorPage

Delegate<ShowNetErrorPageArgs, ShowNetErrorPageAction> molybden::NavigationDelegates::onShowNetErrorPage

Invoked when a network error web page is about to display, because the required web resource cannot be loaded because of a network error.

Use ShowNetErrorPageAction::ShowPage() to show the custom network error page with the given HTML.

Use ShowNetErrorPageAction::Default() to display the default Chromium network error page.

Use the following approach to register a callback:

navigation->onShowNetErrorPage = [](const ShowNetErrorPageArgs& args, ShowNetErrorPageAction action) {};
The NavigationDelegates::onShowNetErrorPage action.
Definition navigation_delegates.hpp:127
The NavigationDelegates::onShowNetErrorPage action arguments.
Definition navigation_delegates.hpp:107

In order to unregister the callback, use the reset() method:

navigation->onShowNetErrorPage.reset();

◆ onStartNavigation

Delegate<StartNavigationArgs, StartNavigationAction> molybden::NavigationDelegates::onStartNavigation

Invoked when navigation to a resource is about to start.

It is the place where you can cancel a navigation request.

Use the following approach to register a callback:

navigation->onStartNavigation = [](const StartNavigationArgs& args, StartNavigationAction action) {};
The NavigationDelegates::onStartNavigation action.
Definition navigation_delegates.hpp:49
The NavigationDelegates::onStartNavigation action arguments.
Definition navigation_delegates.hpp:23

In order to unregister the callback, use the reset() method:

navigation->onStartNavigation.reset();

The documentation for this class was generated from the following file: