Sailfish Webview
API DocumentationLocationPopupInterface QML Type
A component which defines the interface for the location permission popup More...
Import Statement: | import Sailfish.WebView.Popups 1.0 |
Inherits: |
Properties
- host : string
- privateBrowsing : bool
- rememberValue : bool
Detailed Description
The LocationPopupInterface
QML type is exposed through the Sailfish.WebView.Popups
QML import namespace.
Clients who use a WebView in their application may wish to customize the appearance or behavior of the location permission popup in their application.
To do so, their implementation must extend the LocationPopupInterface
, which itself extends the UserPromptInterface, and then they must tell the WebView to use their implementation via the popupProvider
property.
See also UserPromptInterface and custompopups.
Property Documentation
The name of the site which is asking for permission to access the user's location
A custom implementation should bind the text
property of their geolocation permission information text label to the value of this property.
This label will describe to the user which site is asking them for permission to see their location, allowing the user to make an informed acceptance or rejection decision.
Will be true if the user is in private browsing mode
A custom implementation should use the value of this property to determine how to change the look-and-feel of the popup, to ensure that the user is reminded that the web view is currently in private browsing mode.
Also, if in private browsing mode, the custom implementation should not ask the user if they would like the web view to store the permission, and as such it should hide its "remember" toggle switch.
Whether the acceptance or rejection should be remembered for this site, in case it asks for location permission again in the future
A custom implementation should bind this property to the checked
property of their "remember for this site" toggle switch.
It is an output property, whose value is read by the web view.