diff options
author | Rael <rael.gc@gmail.com> | 2015-11-18 16:29:31 -0200 |
---|---|---|
committer | Rael <rael.gc@gmail.com> | 2015-11-18 16:29:31 -0200 |
commit | b05e1291c8154ee2d492514e572c9a78b8df671e (patch) | |
tree | 66dc617114ffb608f0d66a0617c69924ae72fd05 | |
parent | 6d3df640b7cc469910d8f22a3d10e9950ff936dc (diff) | |
download | scudcloud-b05e1291c8154ee2d492514e572c9a78b8df671e.zip scudcloud-b05e1291c8154ee2d492514e572c9a78b8df671e.tar.gz scudcloud-b05e1291c8154ee2d492514e572c9a78b8df671e.tar.bz2 |
Starting the webkit-JS bridge earlier (#292)
-rw-r--r-- | scudcloud-1.0/lib/wrapper.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scudcloud-1.0/lib/wrapper.py b/scudcloud-1.0/lib/wrapper.py index 6ac594a..65c6c6b 100644 --- a/scudcloud-1.0/lib/wrapper.py +++ b/scudcloud-1.0/lib/wrapper.py @@ -83,6 +83,8 @@ class Wrapper(QWebView): def _loadStarted(self): # Some custom CSS to clean/fix UX self.settings().setUserStyleSheetUrl(QUrl.fromLocalFile(Resources.get_path("resources.css"))) + # Starting the webkit-JS bridge + self.page().currentFrame().addToJavaScriptWindowObject("desktop", self) def _urlChanged(self, qUrl): url = qUrl.toString() @@ -92,7 +94,6 @@ class Wrapper(QWebView): self.load(QUrl("https://"+qUrl.host()+"/messages/general")) def _loadFinished(self, ok=True): - self.page().currentFrame().addToJavaScriptWindowObject("desktop", self) self.page().currentFrame().evaluateJavaScript(self.js) self.window.statusBar().hide() |