webkit.policy_decision

Module for [PolicyDecision] class

Types 3

A pending policy decision.

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.PolicyDecision.use was called as soon as signal handling completes. To make a policy decision asynchronously, simply increment the reference count of the #WebKitPolicyDecision object.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
PolicyDecision self() nothrowReturns `this`, for use in `with` statements.
PolicyDecisionGidBuilder builder() static nothrowGet builder for [webkit.policy_decision.PolicyDecision] Returns: New builder object
void download() nothrowSpawn a download from this decision.
void ignore() nothrow#WebKitResponsePolicyDecision, this would cancel the request.
void use() nothrowAccept the action which triggered this decision.
void useWithPolicies(webkit.website_policies.WebsitePolicies policies) nothrowAccept the navigation action and continue with provided policies.
Constructors
this(void * ptr, Flag!"Take" take)
Methods
PolicyDecision build() nothrowCreate object from builder. Returns: New object