support multi-frame following
This commit is contained in:
parent
4c9d0433a6
commit
ac5354020e
11 changed files with 234 additions and 95 deletions
|
@ -1,28 +0,0 @@
|
|||
import CommonComponent from './common';
|
||||
import * as consoleFrames from '../console-frames';
|
||||
import messages from 'shared/messages';
|
||||
|
||||
export default class TopContent {
|
||||
|
||||
constructor(win, store) {
|
||||
this.win = win;
|
||||
this.children = [new CommonComponent(win, store)];
|
||||
|
||||
// TODO make component
|
||||
consoleFrames.initialize(window.document);
|
||||
}
|
||||
|
||||
update() {
|
||||
this.children.forEach(c => c.update());
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
Reference in a new issue