Index: lib/messaging.js |
diff --git a/lib/messaging.js b/lib/messaging.js |
index 8cb24de383f32a0a7995339e5863a533687b1e68..5159ce6366dae02381f89274c1df52caad0d8d5b 100644 |
--- a/lib/messaging.js |
+++ b/lib/messaging.js |
@@ -34,7 +34,7 @@ function Port() |
}; |
Port.prototype = { |
- _onMessage: function(message, sender, sendResponse) |
+ _onMessage(message, sender, sendResponse) |
{ |
let async = false; |
let callbacks = this._eventEmitter.listeners(message.type); |
@@ -81,7 +81,7 @@ Port.prototype = { |
* @param {string} name |
* @param {Port~messageCallback} callback |
*/ |
- on: function(name, callback) |
+ on(name, callback) |
{ |
this._eventEmitter.on(name, callback); |
}, |
@@ -92,7 +92,7 @@ Port.prototype = { |
* @param {string} name |
* @param {Port~messageCallback} callback |
*/ |
- off: function(name, callback) |
+ off(name, callback) |
{ |
this._eventEmitter.off(name, callback); |
}, |
@@ -100,7 +100,7 @@ Port.prototype = { |
/** |
* Disables the port and makes it stop listening to incoming messages. |
*/ |
- disconnect: function() |
+ disconnect() |
{ |
ext.onMessage.removeListener(this._onMessage); |
} |