Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

Sailfish Webview

API Documentation
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Signals
  • Detailed Description

UserPromptInterface QML Type

A component which defines the base interface for all user interaction popups More...

Import Statement: import Sailfish.WebView.Popups 1.0
Inherited By:

AlertPopupInterface, AuthPopupInterface, ConfirmPopupInterface, LocationPopupInterface, PromptPopupInterface, and SelectorPopupInterface

  • List of all members, including inherited members

Properties

  • acceptText : string
  • cancelText : string
  • preventDialogsPrefillValue : bool
  • preventDialogsValue : bool
  • preventDialogsVisible : bool
  • title : string

Signals

  • accepted()
  • rejected()

Detailed Description

The UserPromptInterface QML type is exposed through the Sailfish.WebView.Popups QML import namespace.

Clients do not need to extend this type directly, but instead should extend one of the interaction-type specific interface types.

See also custompopups.

Property Documentation

acceptText : string

The key of the text to display for the acceptance action, if applicable

The possible keys that may be provided are as follows:

  • "OK"
  • "Cancel"
  • "Yes"
  • "No"
  • "Save"
  • "DontSave"
  • "Revert"
  • "AcceptLogin"
  • "" (empty string)

For example, in a confirmation popup with "OK" and "Cancel" options, an acceptText of "OK" will be passed. The label on the accept button should be a suitable translation for this.

Apart from "AcceptLogin", these keys are from the commonDialogs.properties gecko localization file. You can search the Firefox Pontoon localization database for this file, followed by the appropriate key for appropriate translations.

It is up to the implementation to provide suitable translations; the gecko translation keys should not be used directly.

The possible keys may change with future engine updates.


cancelText : string

The key of the text to display for the rejection action, if applicable

The possible keys that may be provided are as follows:

  • "OK"
  • "Cancel"
  • "Yes"
  • "No"
  • "Save"
  • "DontSave"
  • "Revert"
  • "" (empty string)

For example, in a confirmation popup with "OK" and "Cancel" options, a cancelText of "Cancel" will be passed. The label on the cancel button should be a suitable translation for this.

These keys are from the commonDialogs.properties gecko localization file. You can search the Firefox Pontoon localization database for this file, followed by the appropriate key for appropriate translations.

It is up to the implementation to provide suitable translations; the gecko translation keys should not be used directly.

The possible keys may change with future engine updates.


preventDialogsPrefillValue : bool

Whether the toggle switch shown in the prompt which allows the user to prevent this site from showing popups in future should be prefilled to the value true or false

A custom implementation should bind the checked property of their toggle switch to the value of this property.


preventDialogsValue : bool

The output value which is read by the popups opener, telling it whether the user wanted to prevent the site from opening further popups of this type in future

A custom implementation should bind this property to the checked property of their toggle switch.

It is an output property, whose value is read by the web view.


preventDialogsVisible : bool

Whether the prompt should include a toggle switch allowing the user to prevent this site from showing popups in future

A custom implementation should bind the visible property of their toggle switch to the value of this property.


title : string

The text to display as the title of the prompt

A custom implementation should bind the text property of their header or title label to the value of this property.


Signal Documentation

accepted()

This signal is emitted by the popup if the user accepts the prompt

If the custom implementation provides an acceptance action (e.g. a button or navigation action which the user can trigger to allow the site to access the data, or confirm the action) it must emit this signal when the user triggers that action.

After emitting this signal, the popup should perform an appropriate transition to make itself invisible and non-interactable (e.g. for an item-derived popup, an animated opacity transition, and then setting visible to false once the animation is complete).


rejected()

This signal is emitted by the popup if the user rejects the prompt

If the custom implementation provides a rejection action (e.g. a button or navigation action which the user can trigger to disallow the site to access the data, or deny the action) it must emit this signal when the user triggers that action.

After emitting this signal, the popup should perform an appropriate transition to make itself invisible and non-interactable (e.g. for an item-derived popup, an animated opacity transition, and then setting visible to false once the animation is complete).


  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn