[Spice-devel] [PATCH spice-html5 2/3] Fix the console toggle in the new ES6 environment.

Jeremy White jwhite at codeweavers.com
Thu Feb 14 18:55:10 UTC 2019


Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
 spice.html | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/spice.html b/spice.html
index f9e1af4..d744ef9 100644
--- a/spice.html
+++ b/spice.html
@@ -146,8 +146,10 @@
                     m.style.display = 'none';
                 }
 
-                window.addEventListener('resize', handle_resize);
-                SpiceHtml5.resize_helper(sc);
+                window.addEventListener('resize', SpiceHtml5.handle_resize);
+                if (sc) {
+                    SpiceHtml5.resize_helper(sc);
+                }
             }
             /* SPICE port event listeners
             window.addEventListener('spice-port-data', function(event) {
@@ -162,6 +164,7 @@
             */
 
             document.getElementById('connectButton').onclick = connect;
+            document.getElementById('show_console').onchange = toggle_console;
         </script>
 
     </head>
@@ -173,7 +176,7 @@
             <label for="host">Host:</label> <input type='text' id='host' value='localhost'> <!-- localhost -->
             <label for="port">Port:</label> <input type='text' id='port' value='5959'>
             <label for="password">Password:</label> <input type='password' id='password' value=''>
-            <label for="show_console">Show console </label><input type="checkbox" id="show_console" value="1" onchange="toggle_console()" checked>
+            <label for="show_console">Show console </label><input type="checkbox" id="show_console" value="1"" checked>
             <button id="connectButton">Start</button>
         </div>
 
-- 
2.11.0



More information about the Spice-devel mailing list