WebKit.ResponsePolicyDecision

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

Subclasses:

None

Methods

Inherited:

WebKit.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

WebKit.URIRequest

r

response

WebKit.URIResponse

r

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class WebKit.ResponsePolicyDecision(**kwargs)
Bases:

WebKit.PolicyDecision

Abstract:

No

Structure:

WebKit.ResponsePolicyDecisionClass

A policy decision for resource responses.

WebKit.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:

WebKit.URIRequest

Return the WebKit.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:

WebKit.URIResponse

Gets the value of the WebKit.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 WebKit.WebView.

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

New in version 2.4.

Property Details

WebKit.ResponsePolicyDecision.props.request
Name:

request

Type:

WebKit.URIRequest

Default Value:

None

Flags:

READABLE

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

WebKit.ResponsePolicyDecision.props.response
Name:

response

Type:

WebKit.URIResponse

Default Value:

None

Flags:

READABLE

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