aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend-api-forwarder.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-05-02 12:50:44 -0400
committerGitHub <noreply@github.com>2020-05-02 12:50:44 -0400
commit6c341a13d813fc63b76fbbffe7920eeaf116d3a8 (patch)
treedf6f10e3e68bd22e50731af94fe5de328fe2a1da /ext/bg/js/backend-api-forwarder.js
parentcae6b657ab418a1cafedcb1cf72d0e793fa5178b (diff)
Refactor frontend API classes (#482)
* Mark functions as private * Remove constructor side effects * Use safer handler invocation * Mark functions as private * Mark fields as private * Update BackendApiForwarder public API
Diffstat (limited to 'ext/bg/js/backend-api-forwarder.js')
-rw-r--r--ext/bg/js/backend-api-forwarder.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/backend-api-forwarder.js b/ext/bg/js/backend-api-forwarder.js
index 93db77d7..4ac12730 100644
--- a/ext/bg/js/backend-api-forwarder.js
+++ b/ext/bg/js/backend-api-forwarder.js
@@ -17,11 +17,11 @@
class BackendApiForwarder {
- constructor() {
- chrome.runtime.onConnect.addListener(this.onConnect.bind(this));
+ prepare() {
+ chrome.runtime.onConnect.addListener(this._onConnect.bind(this));
}
- onConnect(port) {
+ _onConnect(port) {
if (port.name !== 'backend-api-forwarder') { return; }
let tabId;