gi-webkit-6.0.2: WebKit bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit.Objects.ResponsePolicyDecision

Description

A policy decision for resource responses.

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

Synopsis

Exported types

newtype ResponsePolicyDecision Source #

Memory-managed wrapper type.

class (GObject o, IsDescendantOf ResponsePolicyDecision o) => IsResponsePolicyDecision o Source #

Type class for types which can be safely cast to ResponsePolicyDecision, for instance with toResponsePolicyDecision.

Instances

Instances details
(GObject o, IsDescendantOf ResponsePolicyDecision o) => IsResponsePolicyDecision o Source # 
Instance details

Defined in GI.WebKit.Objects.ResponsePolicyDecision

toResponsePolicyDecision :: (MonadIO m, IsResponsePolicyDecision o) => o -> m ResponsePolicyDecision Source #

Cast to ResponsePolicyDecision, for types for which this is known to be safe. For general casts, use castTo.

Methods

getRequest

responsePolicyDecisionGetRequest Source #

Arguments

:: (HasCallStack, MonadIO m, IsResponsePolicyDecision a) 
=> a

decision: a ResponsePolicyDecision

-> m URIRequest

Returns: The URI request that is associated with this policy decision.

Return the URIRequest associated with the response decision.

Modifications to the returned object are <emphasis>not</emphasis> 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.

getResponse

responsePolicyDecisionGetResponse Source #

Arguments

:: (HasCallStack, MonadIO m, IsResponsePolicyDecision a) 
=> a

decision: a ResponsePolicyDecision

-> m URIResponse

Returns: The URI response that is associated with this policy decision.

Gets the value of the ResponsePolicyDecision:response property.

isMainFrameMainResource

responsePolicyDecisionIsMainFrameMainResource Source #

Arguments

:: (HasCallStack, MonadIO m, IsResponsePolicyDecision a) 
=> a

decision: a ResponsePolicyDecision

-> m Bool

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

Gets whether the request is the main frame main resource

Since: 2.40

isMimeTypeSupported

responsePolicyDecisionIsMimeTypeSupported Source #

Arguments

:: (HasCallStack, MonadIO m, IsResponsePolicyDecision a) 
=> a

decision: a ResponsePolicyDecision

-> m Bool

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

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

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

Since: 2.4

Properties

request

This property contains the URIRequest associated with this policy decision.

getResponsePolicyDecisionRequest :: (MonadIO m, IsResponsePolicyDecision o) => o -> m URIRequest Source #

Get the value of the “request” property. When overloading is enabled, this is equivalent to

get responsePolicyDecision #request

response

This property contains the URIResponse associated with this policy decision.

getResponsePolicyDecisionResponse :: (MonadIO m, IsResponsePolicyDecision o) => o -> m URIResponse Source #

Get the value of the “response” property. When overloading is enabled, this is equivalent to

get responsePolicyDecision #response