WebKit2.GeolocationPermissionRequest

g GObject.GInterface GObject.GInterface WebKit2.PermissionRequest WebKit2.PermissionRequest GObject.GInterface->WebKit2.PermissionRequest GObject.Object GObject.Object WebKit2.GeolocationPermissionRequest WebKit2.GeolocationPermissionRequest GObject.Object->WebKit2.GeolocationPermissionRequest WebKit2.PermissionRequest->WebKit2.GeolocationPermissionRequest

Subclasses:

None

Methods

Inherited:

GObject.Object (37), WebKit2.PermissionRequest (2)

Structs:

GObject.ObjectClass (5)

Virtual Methods

Inherited:

GObject.Object (7), WebKit2.PermissionRequest (2)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class WebKit2.GeolocationPermissionRequest(**kwargs)
Bases:

GObject.Object, WebKit2.PermissionRequest

Abstract:

No

Structure:

WebKit2.GeolocationPermissionRequestClass

A permission request for sharing the user’s location.

WebKit2.GeolocationPermissionRequest 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 WebKit2.GeolocationPermissionRequest 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 Gio.Application (or any subclass like Gtk.Application), WebKit will automatically use the identifier returned by Gio.Application.get_application_id(). This is the recommended approach for enabling geolocation in applications.

If an identifier cannot be obtained through Gio.Application, the value returned by GLib.get_prgname() will be used instead as a fallback. For programs which cannot use Gio.Application, calling GLib.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.