WebKit2.NavigationPolicyDecision

g GObject.Object GObject.Object WebKit2.PolicyDecision WebKit2.PolicyDecision GObject.Object->WebKit2.PolicyDecision WebKit2.NavigationPolicyDecision WebKit2.NavigationPolicyDecision WebKit2.PolicyDecision->WebKit2.NavigationPolicyDecision

Subclasses:

None

Methods

Inherited:

WebKit2.PolicyDecision (4), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_frame_name ()

get_modifiers ()

get_mouse_button ()

get_navigation_action ()

get_navigation_type ()

get_request ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

frame-name

str

r

deprecated

modifiers

int

r

deprecated

mouse-button

int

r

deprecated

navigation-action

WebKit2.NavigationAction

r

navigation-type

WebKit2.NavigationType

r

deprecated

request

WebKit2.URIRequest

r

deprecated

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

WebKit2.PolicyDecision

r

Class Details

class WebKit2.NavigationPolicyDecision(**kwargs)
Bases:

WebKit2.PolicyDecision

Abstract:

No

Structure:

WebKit2.NavigationPolicyDecisionClass

A policy decision for navigation actions.

WebKit2.NavigationPolicyDecision represents a policy decision for events associated with navigations. If the value of WebKit2.NavigationPolicyDecision :mouse-button is not 0, then the navigation was triggered by a mouse event.

get_frame_name()
Returns:

The name of the new frame this navigation action targets or None

Return type:

str

Gets the value of the WebKit2.NavigationPolicyDecision :frame-name property.

Deprecated since version 2.40: Use WebKit2.NavigationPolicyDecision.get_navigation_action() instead.

get_modifiers()
Returns:

The modifiers active if this decision was triggered by a mouse event

Return type:

int

Gets the value of the WebKit2.NavigationPolicyDecision :modifiers property.

Deprecated since version 2.6: Use WebKit2.NavigationPolicyDecision.get_navigation_action() instead.

get_mouse_button()
Returns:

The mouse button used if this decision was triggered by a mouse event or 0 otherwise

Return type:

int

Gets the value of the WebKit2.NavigationPolicyDecision :mouse-button property.

Deprecated since version 2.6: Use WebKit2.NavigationPolicyDecision.get_navigation_action() instead.

get_navigation_action()
Returns:

The WebKit2.NavigationAction triggering this policy decision.

Return type:

WebKit2.NavigationAction

Gets the value of the WebKit2.NavigationPolicyDecision :navigation-action property.

New in version 2.6.

get_navigation_type()
Returns:

The type of navigation triggering this policy decision.

Return type:

WebKit2.NavigationType

Gets the value of the WebKit2.NavigationPolicyDecision :navigation-type property.

Deprecated since version 2.6: Use WebKit2.NavigationPolicyDecision.get_navigation_action() instead.

get_request()
Returns:

The URI request that is associated with this navigation

Return type:

WebKit2.URIRequest

Gets the value of the WebKit2.NavigationPolicyDecision :request property.

Deprecated since version 2.6: Use WebKit2.NavigationPolicyDecision.get_navigation_action() instead.

Property Details

WebKit2.NavigationPolicyDecision.props.frame_name
Name:

frame-name

Type:

str

Default Value:

None

Flags:

READABLE

If this navigation request targets a new frame, this property contains the name of that frame. For example if the decision was triggered by clicking a link with a target attribute equal to “_blank”, this property will contain the value of that attribute. In all other cases, this value will be None.

Deprecated since version 2.40: Use WebKit2.NavigationPolicyDecision :navigation-action instead

WebKit2.NavigationPolicyDecision.props.modifiers
Name:

modifiers

Type:

int

Default Value:

0

Flags:

READABLE

If the navigation associated with this policy decision was originally triggered by a mouse event, this property contains a bitmask of various Gdk.ModifierType values describing the modifiers used for that click. If the navigation was not triggered by a mouse event or no modifiers were active, the value of this property will be zero.

Deprecated since version 2.6: Use WebKit2.NavigationPolicyDecision :navigation-action instead

WebKit2.NavigationPolicyDecision.props.mouse_button
Name:

mouse-button

Type:

int

Default Value:

0

Flags:

READABLE

If the navigation associated with this policy decision was originally triggered by a mouse event, this property contains non-zero button number of the button triggering that event. The button numbers match those from GDK. If the navigation was not triggered by a mouse event, the value of this property will be 0.

Deprecated since version 2.6: Use WebKit2.NavigationPolicyDecision :navigation-action instead

WebKit2.NavigationPolicyDecision.props.navigation_action
Name:

navigation-action

Type:

WebKit2.NavigationAction

Default Value:

None

Flags:

READABLE

The WebKit2.NavigationAction that triggered this policy decision.

New in version 2.6.

WebKit2.NavigationPolicyDecision.props.navigation_type
Name:

navigation-type

Type:

WebKit2.NavigationType

Default Value:

WebKit2.NavigationType.LINK_CLICKED

Flags:

READABLE

The type of navigation that triggered this policy decision. This is useful for enacting different policies depending on what type of user action caused the navigation.

Deprecated since version 2.6: Use WebKit2.NavigationPolicyDecision :navigation-action instead

WebKit2.NavigationPolicyDecision.props.request
Name:

request

Type:

WebKit2.URIRequest

Default Value:

None

Flags:

READABLE

This property contains the WebKit2.URIRequest associated with this navigation.

Deprecated since version 2.6: Use WebKit2.NavigationPolicyDecision :navigation-action instead