GUACAMOLE-1293: Add common support for the msg instruction.

This commit is contained in:
Virtually Nick
2021-12-25 21:15:59 -05:00
parent 5966dcae63
commit ca2b89077c
3 changed files with 32 additions and 1 deletions

View File

@@ -687,6 +687,17 @@ Guacamole.Client = function(tunnel) {
* A status object which describes the error.
*/
this.onerror = null;
/**
* Fired when a message is received from the remote tunnel and needs to be
* displayed to the user.
*
* @event
* @param {String} message
* The message sent by the remote end of the tunnel that should be
* displayed for the user.
*/
this.onmsg = null;
/**
* Fired when a audio stream is created. The stream provided to this event
@@ -1399,6 +1410,12 @@ Guacamole.Client = function(tunnel) {
}
},
"msg" : function(parameters) {
if (guac_client.onmsg) guac_client.onmsg(parameters[0]);
},
"name": function(parameters) {
if (guac_client.onname) guac_client.onname(parameters[0]);