Remove unused options argument in onnotification event handler

This commit is contained in:
Pierre Ossman 2017-10-27 09:30:47 +02:00
parent 2f4516f293
commit 65fdfeae13
4 changed files with 5 additions and 12 deletions

View File

@ -534,7 +534,7 @@ var UI = {
document.getElementById('noVNC_status').classList.remove("noVNC_open");
},
notification: function (rfb, msg, level, options) {
notification: function (rfb, msg, level) {
UI.showStatus(msg, level);
},

View File

@ -588,11 +588,10 @@ RFB.prototype = {
* Send a notification to the UI. Valid levels are:
* 'normal'|'warn'|'error'
*
* NOTE: Options could be added in the future.
* NOTE: If this function is called multiple times, remember that the
* interface could be only showing the latest notification.
*/
_notification: function(msg, level, options) {
_notification: function(msg, level) {
switch (level) {
case 'normal':
case 'warn':
@ -604,11 +603,7 @@ RFB.prototype = {
return;
}
if (options) {
this.onnotification(this, msg, level, options);
} else {
this.onnotification(this, msg, level);
}
this.onnotification(this, msg, level);
},
_setCapability: function (cap, val) {

View File

@ -206,11 +206,9 @@ severity of the message. The following levels are currently defined:
- `"warn"`
- `"error"`
**`options`** is currently unused.
##### Syntax
RFB.onnotification = function(rfb, msg, level, options) { ... }
RFB.onnotification = function(rfb, msg, level) { ... }
#### RFB.ondisconnected

View File

@ -189,7 +189,7 @@
status(reason, "error");
}
}
function notification(rfb, msg, level, options) {
function notification(rfb, msg, level) {
status(msg, level);
}