NavigationRequest QML Type

Request to navigate to a new page More...

Import Statement: import com.canonical.Oxide 1.15
Instantiates: OxideQNavigationRequest

Properties

Detailed Description

NavigationRequest represents a request to navigate to a new page. It is only used for content-initiated navigations.

Due to a mis-design of this API, it is currently used in more than one context. If disposition is DispositionCurrentTab, then this is a request to navigate the current webview. In this case url will indicate the actual URL that will be committed (redirects have already occurred at this point).

If disposition is not DispositionCurrentTab, then this is actually part of a request to open a new webview, whether this is due to a call to window.open() or the result of a link click with modifier keys pressed. In this case, url will indicate the initial URL that will be loaded in the new view (before any redirects occur).

The application gives its response by setting action appropriately.

Property Documentation

action : enumeration

This property stores the application's response. The default is ActionAccept.

Possible values are:

ConstantDescription
NavigationRequest.ActionAcceptAllow the navigation to proceed
NavigationRequest.ActionRejectBlock the navigation

disposition : enumeration

Indicates the type of request. If this is DispositionCurrentTab, then it is a request to perform a navigation in the current view. Otherwise it is part of a request to open a new view, with the disposition acting as a hint to the type of view that the application will be asked to present.

Possible values are:

ConstantDescription
NavigationRequest.DispositionCurrentTabA request to navigate in the current view
NavigationRequest.DispositionNewForegroundTabA request to begin a navigation in a new foreground tab
NavigationRequest.DispositionNewBackgroundTabA request to begin a navigation in a new background tab
NavigationRequest.DispositionNewPopupA request to begin a navigation in a popup
NavigationRequest.DispositionNewWindowA request to begin a navigation in a new window

url : url

The URL of the navigation request. If disposition is DispositionCurrentTab, this is the URL that will be committed (redirects have already occurred), else this will be the initial URL (before any redirects occur).