Functions ========= .. currentmodule:: gi.repository.WebKit .. function:: download_error_quark() -> int .. function:: favicon_database_error_quark() -> int .. function:: get_major_version() -> int Returns the major version number of the WebKit library. (e.g. in WebKit version 1.8.3 this is 1.) This function is in the library, so it represents the WebKit library your code is running against. Contrast with the ``WEBKIT_MAJOR_VERSION`` macro, which represents the major version of the WebKit headers you have included when compiling your code. :return: the major version number of the WebKit library .. function:: get_micro_version() -> int Returns the micro version number of the WebKit library. (e.g. in WebKit version 1.8.3 this is 3.) This function is in the library, so it represents the WebKit library your code is running against. Contrast with the ``WEBKIT_MICRO_VERSION`` macro, which represents the micro version of the WebKit headers you have included when compiling your code. :return: the micro version number of the WebKit library .. function:: get_minor_version() -> int Returns the minor version number of the WebKit library. (e.g. in WebKit version 1.8.3 this is 8.) This function is in the library, so it represents the WebKit library your code is running against. Contrast with the ``WEBKIT_MINOR_VERSION`` macro, which represents the minor version of the WebKit headers you have included when compiling your code. :return: the minor version number of the WebKit library .. function:: javascript_error_quark() -> int .. function:: media_error_quark() -> int .. function:: media_key_system_permission_get_name(request: ~gi.repository.WebKit.MediaKeySystemPermissionRequest) -> str Get the key system for which access permission is being requested. .. versionadded:: 2.32 :param request: a :obj:`~gi.repository.WebKit.MediaKeySystemPermissionRequest` :return: the key system name for ``request`` .. function:: network_error_quark() -> int .. function:: policy_error_quark() -> int .. function:: print_error_quark() -> int .. function:: snapshot_error_quark() -> int .. function:: uri_for_display(uri: str) -> str | None Use this function to format a URI for display. The URIs used internally by WebKit may contain percent-encoded characters or Punycode, which are not generally suitable to display to users. This function provides protection against IDN homograph attacks, so in some cases the host part of the returned URI may be in Punycode if the safety check fails. .. versionadded:: 2.24 :param uri: the URI to be converted :return: ``uri`` suitable for display, or :const:`None` in case of error. .. function:: user_content_filter_error_quark() -> int .. function:: user_media_permission_is_for_audio_device(request: ~gi.repository.WebKit.UserMediaPermissionRequest) -> bool Check whether the permission request is for an audio device. .. versionadded:: 2.8 :param request: a :obj:`~gi.repository.WebKit.UserMediaPermissionRequest` :return: :const:`True` if access to an audio device was requested. .. function:: user_media_permission_is_for_display_device(request: ~gi.repository.WebKit.UserMediaPermissionRequest) -> bool Check whether the permission request is for a display device. .. versionadded:: 2.34 :param request: a :obj:`~gi.repository.WebKit.UserMediaPermissionRequest` :return: :const:`True` if access to a display device was requested. .. function:: user_media_permission_is_for_video_device(request: ~gi.repository.WebKit.UserMediaPermissionRequest) -> bool Check whether the permission request is for a video device. .. versionadded:: 2.8 :param request: a :obj:`~gi.repository.WebKit.UserMediaPermissionRequest` :return: :const:`True` if access to a video device was requested. .. function:: user_message_error_quark() -> int