aboutsummaryrefslogtreecommitdiff
path: root/src/content/components/top-content
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/components/top-content')
-rw-r--r--src/content/components/top-content/follow-controller.js2
-rw-r--r--src/content/components/top-content/index.js5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/content/components/top-content/follow-controller.js b/src/content/components/top-content/follow-controller.js
index 29f40b3..7570cf8 100644
--- a/src/content/components/top-content/follow-controller.js
+++ b/src/content/components/top-content/follow-controller.js
@@ -17,6 +17,8 @@ export default class FollowController {
this.state = {};
this.keys = [];
this.producer = null;
+
+ messages.onMessage(this.onMessage.bind(this));
}
onMessage(message, sender) {
diff --git a/src/content/components/top-content/index.js b/src/content/components/top-content/index.js
index a2179da..c318901 100644
--- a/src/content/components/top-content/index.js
+++ b/src/content/components/top-content/index.js
@@ -14,19 +14,20 @@ export default class TopContent {
// TODO make component
consoleFrames.initialize(window.document);
+
+ messages.onMessage(this.onMessage.bind(this));
}
update() {
this.children.forEach(c => c.update());
}
- onMessage(message, sender) {
+ onMessage(message) {
switch (message.type) {
case messages.CONSOLE_HIDE_COMMAND:
this.win.focus();
consoleFrames.blur(window.document);
return Promise.resolve();
}
- this.children.forEach(c => c.onMessage(message, sender));
}
}