Direct example. Move all DOM code default_controls.js.
Move DOM manipulation into include/default_controls.js and update vnc.html to use it. Add an example vnc_auto.html which automatically connects using parameters from the query string and doesn't use default_controls.js. Reorder functions in vnc.js to put external interface functions at the top of the RFB namespace.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<!--
|
||||
noVNC example: simple example using default controls
|
||||
-->
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>VNC Client</title>
|
||||
<link rel="stylesheet" href="include/plain.css">
|
||||
@@ -10,8 +12,11 @@
|
||||
</body>
|
||||
|
||||
<script src="vnc.js"></script>
|
||||
<script src="include/default_controls.js"></script>
|
||||
<script>
|
||||
window.onload = function () { RFB.load('vnc'); }
|
||||
window.onload = function () {
|
||||
DefaultControls.load('vnc');
|
||||
RFB.load();
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user