* Adding a way to set the DOM document to use.
This is very usefull when you need to open a new window (with a new document) from javascript, without having to reload the script.js.
This commit is contained in:
+4
-2
@@ -131,7 +131,7 @@ var that = {}, // Public API interface
|
||||
//
|
||||
|
||||
// VNC viewport rendering Canvas
|
||||
Util.conf_default(conf, that, 'target', 'VNC_canvas');
|
||||
//Util.conf_default(conf, that, 'target', 'VNC_canvas');
|
||||
|
||||
Util.conf_default(conf, that, 'encrypt', false, true);
|
||||
Util.conf_default(conf, that, 'true_color', true, true);
|
||||
@@ -139,6 +139,8 @@ Util.conf_default(conf, that, 'true_color', true, true);
|
||||
Util.conf_default(conf, that, 'b64encode', true, true);
|
||||
Util.conf_default(conf, that, 'local_cursor', true, true);
|
||||
|
||||
Util.conf_default(conf, that, 'currentDocument', true, document);
|
||||
|
||||
// time to wait for connection
|
||||
Util.conf_default(conf, that, 'connectTimeout', 2000);
|
||||
// frequency to check for send/receive
|
||||
@@ -194,7 +196,7 @@ function constructor() {
|
||||
}
|
||||
// Initialize canvas
|
||||
try {
|
||||
canvas = new Canvas({'target': conf.target});
|
||||
canvas = new Canvas({'target': conf.target, 'currentDocument': conf.currentDocument});
|
||||
} catch (exc) {
|
||||
Util.Error("Canvas exception: " + exc);
|
||||
updateState('fatal', "No working Canvas");
|
||||
|
||||
Reference in New Issue
Block a user