You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/01/31 00:25:35 UTC
[11/13] git commit: Expose main webview as a property
Expose main webview as a property
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/b0aa7093
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/b0aa7093
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/b0aa7093
Branch: refs/heads/master
Commit: b0aa70930dcfdd8d13fa816895a13417d505f17a
Parents: 2dcd53f
Author: Alexandre Abreu <wi...@gmail.com>
Authored: Fri Jan 24 11:46:02 2014 -0500
Committer: Alexandre Abreu <wi...@gmail.com>
Committed: Mon Jan 27 10:49:26 2014 -0500
----------------------------------------------------------------------
Cordovaqt/CordovaViewInternal.qml | 8 +++++++-
qml/CordovaView.qml.in | 5 +++++
2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/b0aa7093/Cordovaqt/CordovaViewInternal.qml
----------------------------------------------------------------------
diff --git a/Cordovaqt/CordovaViewInternal.qml b/Cordovaqt/CordovaViewInternal.qml
index 344f44c..f61f3bd 100644
--- a/Cordovaqt/CordovaViewInternal.qml
+++ b/Cordovaqt/CordovaViewInternal.qml
@@ -24,12 +24,17 @@ import Ubuntu.Components 0.1
import Ubuntu.Components.Popups 0.1
Item {
+ id: root
+
anchors.fill: parent
+
state: "main"
- id: root
signal completed
+
property string splashscreenPath
property bool disallowOverscroll
+ property var mainWebview
+
function exec(plugin, func, args) {
CordovaWrapper.execMethod(plugin, func, args);
}
@@ -79,6 +84,7 @@ Item {
}
Component.onCompleted: {
+ root.mainWebview = webView;
webView.url = cordova.mainUrl
}
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/b0aa7093/qml/CordovaView.qml.in
----------------------------------------------------------------------
diff --git a/qml/CordovaView.qml.in b/qml/CordovaView.qml.in
index 1629acd..d3ea4ca 100644
--- a/qml/CordovaView.qml.in
+++ b/qml/CordovaView.qml.in
@@ -24,6 +24,8 @@ Item {
property string wwwDir
property bool disallowOverscroll
+ property var mainWebview
+
Cordova {
id: cordova
wwwDir: root.wwwDir
@@ -37,8 +39,11 @@ Item {
asynchronous: true
visible: false
anchors.fill: parent
+
onLoaded: {
+ root.mainWebview = loader.item.mainWebview
cordova.parent = loader.item
+
loader.item.completed.connect(function(){
loader.item.visible = true
loader.visible = true