:right-sidebar: True PermissionStateQuery =================================================================== .. currentmodule:: gi.repository.WebKit .. class:: PermissionStateQuery(*args, **kwargs) :no-contents-entry: This query represents a user's choice to allow or deny access to "powerful features" of the platform, as specified in the `Permissions W3C Specification `__\. When signalled by the :obj:`~gi.repository.WebKit.WebView` through the ``query-permission-state`` signal, the application has to eventually respond, via ``webkit_permission_state_query_finish()``\, whether it grants, denies or requests a dedicated permission prompt for the given query. When a :obj:`~gi.repository.WebKit.PermissionStateQuery` is not handled by the user, the user-agent is instructed to ``prompt`` the user for the given permission. Methods ------- .. rst-class:: interim-class .. class:: PermissionStateQuery :no-index: .. method:: finish(state: ~gi.repository.WebKit.PermissionState) -> None Notify the web-engine of the selected permission state for the given query. This function should only be called as a response to the ``WebKitWebView::query-permission-state`` signal. .. versionadded:: 2.40 :param state: a :obj:`~gi.repository.WebKit.PermissionState` .. method:: get_name() -> str Get the permission name for which access is being queried. .. versionadded:: 2.40 .. method:: get_security_origin() -> ~gi.repository.WebKit.SecurityOrigin Get the permission origin for which access is being queried. .. versionadded:: 2.40