diff options
author | Pierre Ossman <ossman@cendio.se> | 2019-02-15 10:22:27 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2019-02-15 10:22:27 +0100 |
commit | b8ff5d1bdedcb1f3d3d705fbeb39b9c05dd04fe1 (patch) | |
tree | e0a70445ca629b72c2712911e599841d34a9aa65 | |
parent | 17eea9574dfafa4a90666ec8761c6bab2aa7601b (diff) | |
download | novnc-b8ff5d1bdedcb1f3d3d705fbeb39b9c05dd04fe1.tar.gz |
Use arrow function to avoid bind
-rw-r--r-- | core/rfb.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/rfb.js b/core/rfb.js index 42c4ad3..39683cb 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -182,7 +182,9 @@ export default class RFB extends EventTargetMixin { this._mouse.onmousemove = this._handleMouseMove.bind(this); this._sock = new Websock(); - this._sock.on('message', this._handle_message.bind(this)); + this._sock.on('message', () => { + this._handle_message(); + }); this._sock.on('open', () => { if ((this._rfb_connection_state === 'connecting') && (this._rfb_init_state === '')) { |