When uploading a file and selecting the browser from the list of peers, nothing happens, and I’m seeing the following error in the logs:
file:///usr/share/webbrowser-app/webbrowser/ContentPickerDialog.qml:57: ReferenceError: WebView is not defined
If I add an "import com.canonical.Oxide 1.0" statement at the top of that file, the error becomes:
file:///usr/share/webbrowser-app/webbrowser/ContentPickerDialog.qml:58: TypeError: Cannot call method 'showDownloadsPage' of null
This is because the "WebView.view" attached property is valid only in the context of the top-level element (picker). Adding a top level [readonly property var webview: WebView.view] property to picker, and referring to it with [var downloadPage = picker.webview.showDownloadsPage()] fixes the issue.
When uploading a file and selecting the browser from the list of peers, nothing happens, and I’m seeing the following error in the logs:
file:// /usr/share/ webbrowser- app/webbrowser/ ContentPickerDi alog.qml: 57: ReferenceError: WebView is not defined
If I add an "import com.canonical.Oxide 1.0" statement at the top of that file, the error becomes:
file:// /usr/share/ webbrowser- app/webbrowser/ ContentPickerDi alog.qml: 58: TypeError: Cannot call method 'showDownloadsPage' of null
This is because the "WebView.view" attached property is valid only in the context of the top-level element (picker). Adding a top level [readonly property var webview: WebView.view] property to picker, and referring to it with [var downloadPage = picker. webview. showDownloadsPa ge()] fixes the issue.