PolicyDecision

Often WebKit allows the client to decide the policy for certain operations. For instance, a client may want to open a link in a new tab, block a navigation entirely, query the user or trigger a download instead of a navigation. In these cases WebKit will fire the #WebKitWebView::decide-policy signal with a #WebKitPolicyDecision object. If the signal handler does nothing, WebKit will act as if webkit_policy_decision_use() was called as soon as signal handling completes. To make a policy decision asynchronously, simply increment the reference count of the #WebKitPolicyDecision object.

Constructors

this
this(WebKitPolicyDecision* webKitPolicyDecision, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

download
void download()

Spawn a download from this decision.

getPolicyDecisionStruct
WebKitPolicyDecision* getPolicyDecisionStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

ignore
void ignore()

Ignore the action which triggered this decision. For instance, for a #WebKitResponsePolicyDecision, this would cancel the request.

use
void use()

Accept the action which triggered this decision.

useWithPolicies
void useWithPolicies(WebsitePolicies policies)

Accept the navigation action which triggered this decision, and continue with @policies affecting all subsequent loads of resources in the origin associated with the accepted navigation action.

Static functions

getType
GType getType()

Variables

webKitPolicyDecision
WebKitPolicyDecision* webKitPolicyDecision;

the main Gtk struct

Meta