Need example to show how to show the alertDialg and confirmDialog for the webview

Bug #1462867 reported by XiaoGuo, Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu API Website
New
Undecided
Unassigned

Bug Description

https://developer.ubuntu.com/api/qml/sdk-14.10/Ubuntu.Web.WebView/

alertDialog and promptDialog are there in the API, but a developer does not know how to make use of them.

Also, the code

import Ubuntu.Components 1.1
import Ubuntu.Web 0.2
WebView {
    contextualActions: ActionList {
        Action {
            text: i18n.tr("Open link in browser")
            enabled: contextualData.href.toString()
            onTriggered: Qt.openUrlExternally(contextualData.href)
        }
    }
}

it is not working at all.

"ReferenceError: contextualData is not defined"

It is good to provide a complete working example for developers on the page.

Best regards,
XiaoGuo

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.