:right-sidebar: True PolicyDecisionType =================================================================== .. currentmodule:: gi.repository.WebKit .. class:: PolicyDecisionType :no-contents-entry: Enum values used for determining the type of a policy decision during :obj:`~gi.repository.WebKit.WebView`::decide-policy. Fields ------ .. rst-class:: interim-class .. class:: PolicyDecisionType :no-index: .. attribute:: NAVIGATION_ACTION This type of policy decision is requested when WebKit is about to navigate to a new page in either the main frame or a subframe. Acceptable policy decisions are either :func:`~gi.repository.WebKit.PolicyDecision.use` or :func:`~gi.repository.WebKit.PolicyDecision.ignore`. This type of policy decision is always a :obj:`~gi.repository.WebKit.NavigationPolicyDecision`. .. attribute:: NEW_WINDOW_ACTION This type of policy decision is requested when WebKit is about to create a new window. Acceptable policy decisions are either :func:`~gi.repository.WebKit.PolicyDecision.use` or :func:`~gi.repository.WebKit.PolicyDecision.ignore`. This type of policy decision is always a :obj:`~gi.repository.WebKit.NavigationPolicyDecision`. These decisions are useful for implementing special actions for new windows, such as forcing the new window to open in a tab when a keyboard modifier is active or handling a special target attribute on elements. .. attribute:: RESPONSE This type of decision is used when WebKit has received a response for a network resource and is about to start the load. Note that these resources include all subresources of a page such as images and stylesheets as well as main documents. Appropriate policy responses to this decision are :func:`~gi.repository.WebKit.PolicyDecision.use`, :func:`~gi.repository.WebKit.PolicyDecision.ignore`, or :func:`~gi.repository.WebKit.PolicyDecision.download`. This type of policy decision is always a :obj:`~gi.repository.WebKit.ResponsePolicyDecision`. This decision is useful for forcing some types of resources to be downloaded rather than rendered in the WebView or to block the transfer of resources entirely.