diff options
Diffstat (limited to 'remoting/webapp/connection_history.js')
-rw-r--r-- | remoting/webapp/connection_history.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/remoting/webapp/connection_history.js b/remoting/webapp/connection_history.js index cd4d5a6..da28701 100644 --- a/remoting/webapp/connection_history.js +++ b/remoting/webapp/connection_history.js @@ -30,14 +30,13 @@ remoting.ConnectionHistory = function() { /** @type {remoting.ConnectionHistory} */ var that = this; var closeButton = document.getElementById('close-connection-history'); - closeButton.addEventListener('click', function() { that.hide(); }, false); + closeButton.addEventListener('click', this.hide.bind(this), false); /** @param {Event} event Event identifying which button was clicked. */ var setFilter = function(event) { that.setFilter_(event.target); }; - var clearHistory = function() { that.clearHistory_(); }; this.viewAll_.addEventListener('click', setFilter, false); this.viewOutgoing_.addEventListener('click', setFilter, false); this.viewIncoming_.addEventListener('click', setFilter, false); - this.clear_.addEventListener('click', clearHistory, false); + this.clear_.addEventListener('click', this.clearHistory_.bind(this), false); }; /** @enum {string} */ |