GeolocationPermissionRequest

class GeolocationPermissionRequest(    val webkitGeolocationPermissionRequestPointer: <Error class: unknown class><<Error class: unknown class>>) : PermissionRequest(source)

A permission request for sharing the user's location.

WebKitGeolocationPermissionRequest represents a request for permission to decide whether WebKit should provide the user's location to a website when requested through the Geolocation API.

When a WebKitGeolocationPermissionRequest is not handled by the user, it is denied by default.

When embedding web views in your application, you must configure an application identifier to allow web content to use geolocation services. The identifier must match the name of the .desktop file which describes the application, sans the suffix.

If your application uses #GApplication (or any subclass like #GtkApplication), WebKit will automatically use the identifier returned by g_application_get_application_id(). This is the recommended approach for enabling geolocation in applications.

If an identifier cannot be obtained through #GApplication, the value returned by g_get_prgname() will be used instead as a fallback. For programs which cannot use #GApplication, calling g_set_prgname() early during initialization is needed when the name of the executable on disk does not match the name of a valid .desktop file.

Constructors

Link copied to clipboard
constructor(webkitGeolocationPermissionRequestPointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

val webkitGeolocationPermissionRequestPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val webkitPermissionRequestPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun allow()

Allow the action which triggered this request.

Link copied to clipboard
open fun deny()

Deny the action which triggered this request.