WebKit2.ResponsePolicyDecision

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

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

get_request ()

get_response ()

is_main_frame_main_resource ()

is_mime_type_supported ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

request

WebKit2.URIRequest

r

response

WebKit2.URIResponse

r

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

WebKit2.PolicyDecision

r

Class Details

class WebKit2.ResponsePolicyDecision(**kwargs)
Bases:

WebKit2.PolicyDecision

Abstract:

No

Structure:

WebKit2.ResponsePolicyDecisionClass

A policy decision for resource responses.

WebKit2.ResponsePolicyDecision represents a policy decision for a resource response, whether from the network or the local system. A very common use case for these types of decision is deciding whether or not to download a particular resource or to load it normally.

get_request()
Returns:

The URI request that is associated with this policy decision.

Return type:

WebKit2.URIRequest

Return the WebKit2.URIRequest associated with the response decision.

Modifications to the returned object are not taken into account when the request is sent over the network, and is intended only to aid in evaluating whether a response decision should be taken or not. To modify requests before they are sent over the network the #WebKitPage::send-request signal can be used instead.

get_response()
Returns:

The URI response that is associated with this policy decision.

Return type:

WebKit2.URIResponse

Gets the value of the WebKit2.ResponsePolicyDecision :response property.

is_main_frame_main_resource()
Returns:

True if the request is the main frame main resouce or False otherwise

Return type:

bool

Gets whether the request is the main frame main resource

New in version 2.40.

is_mime_type_supported()
Returns:

True if the MIME type of the response is supported or False otherwise

Return type:

bool

Gets whether the MIME type of the response can be displayed in the WebKit2.WebView.

Gets whether the MIME type of the response can be displayed in the WebKit2.WebView that triggered this policy decision request. See also WebKit2.WebView.can_show_mime_type().

New in version 2.4.

Property Details

WebKit2.ResponsePolicyDecision.props.request
Name:

request

Type:

WebKit2.URIRequest

Default Value:

None

Flags:

READABLE

This property contains the WebKit2.URIRequest associated with this policy decision.

WebKit2.ResponsePolicyDecision.props.response
Name:

response

Type:

WebKit2.URIResponse

Default Value:

None

Flags:

READABLE

This property contains the WebKit2.URIResponse associated with this policy decision.