From 65fdfeae13c773683020d3152231e9074d35cd40 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 27 Oct 2017 09:30:47 +0200 Subject: [PATCH] Remove unused options argument in onnotification event handler --- app/ui.js | 2 +- core/rfb.js | 9 ++------- docs/API.md | 4 +--- vnc_lite.html | 2 +- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/app/ui.js b/app/ui.js index 52fcf16..1202fe2 100644 --- a/app/ui.js +++ b/app/ui.js @@ -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); }, diff --git a/core/rfb.js b/core/rfb.js index 28e1a4a..55d2099 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -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) { diff --git a/docs/API.md b/docs/API.md index 8627f6c..519d3bf 100644 --- a/docs/API.md +++ b/docs/API.md @@ -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 diff --git a/vnc_lite.html b/vnc_lite.html index f457423..1a952f1 100644 --- a/vnc_lite.html +++ b/vnc_lite.html @@ -189,7 +189,7 @@ status(reason, "error"); } } - function notification(rfb, msg, level, options) { + function notification(rfb, msg, level) { status(msg, level); } -- 2.39.2