use new hook in marketplace code

This commit is contained in:
howard-stearns 2016-08-30 12:18:03 -07:00
parent a48aced7bd
commit c5b998a2a8

View file

@ -48,15 +48,12 @@ Rectangle {
property var autoCancel: 'var element = $("a.btn.cancel");
element.click();'
onNewViewRequested: {
var component = Qt.createComponent("Browser.qml");
var newWindow = component.createObject(desktop);
request.openIn(newWindow.webView);
newWindowHook: function (component, newWindow) {
if (File.isZippedFbx(desktop.currentUrl)) {
runJavaScript(autoCancel);
zipTimer.handler = function() {
newWindow.destroy();
runJavaScript(autoCancel);
}
};
zipTimer.start();
}
}