Fixed browser.qml 'onNewViewRequested'

This commit is contained in:
elisa-lj11 2016-08-22 16:04:55 -07:00
parent 4aab389305
commit 8bf87128d9
2 changed files with 7 additions and 1 deletions

View file

@ -217,6 +217,11 @@ ScrollingWindow {
}
onIconChanged: {
console.log("New icon: " + icon)
}
onNewViewRequested: {
var component = Qt.createComponent("Browser.qml");
var newWindow = component.createObject(desktop);
request.openIn(newWindow.webView)
}
Component.onCompleted: {
desktop.initWebviewProfileHandlers(webview.profile)

View file

@ -66,7 +66,8 @@ Rectangle {
element.removeAttr("download");'
onLinkHovered: {
desktop.currentUrl = hoveredUrl
desktop.currentUrl = hoveredUrl;
// add an error message for non-fbx files
if (File.isZippedFbx(desktop.currentUrl)) {
runJavaScript(simpleDownload, function(){console.log("ran the JS");});
}