WebBrowser/data/html/startPage.html

branch
QtWebEngine
changeset 4862
210f6ea6b9c3
parent 4861
d419f153925d
child 4863
9d86824898e1
--- a/WebBrowser/data/html/startPage.html	Tue Mar 15 21:15:07 2016 +0100
+++ b/WebBrowser/data/html/startPage.html	Wed Mar 16 19:08:48 2016 +0100
@@ -82,11 +82,13 @@
     <script type="text/javascript">
         function update()
         {
-            alert(window.external.searchUrl());
-            document.getElementById('footer').innerHTML = window.external.providerString()
-                                                          + ' | <a href="http://eric-ide.python-projects.org/">'
-                                                          + '@ERIC_LINK@</a>';
-            document.getElementById('lineEdit').placeholder = window.external.providerString();
+            window.external.providerString(function(provider) {
+                document.getElementById('footer').innerHTML = 
+                    provider
+                    + ' | <a href="http://eric-ide.python-projects.org/">'
+                    + '@ERIC_LINK@</a>';
+                document.getElementById('lineEdit').placeholder = provider;
+            });
 
             // Try to change the direction of the page:
 
@@ -94,7 +96,8 @@
             newDir = newDir.toLowerCase();
             if ((newDir != 'ltr') && (newDir != 'rtl'))
                 newDir = 'ltr';
-            document.getElementsByTagName('body')[0].setAttribute('dir', newDir);
+            document.getElementsByTagName('body')[0].setAttribute(
+                'dir', newDir);
         }
 
         function formSubmitted()
@@ -104,8 +107,9 @@
             if (string.length == 0)
                 return;
 
-            var url = window.external.searchUrl(string);
-            window.location.href = url;
+            window.external.searchUrl(string, function(url) {
+                window.location.href = url;
+            });
         }
         
         // Initialize

eric ide

mercurial