Put a parent event bus to pageInfo
This commit is contained in:
parent
4b44efe6fc
commit
74fe85f3a2
@ -135,7 +135,7 @@ export default class UWContent {
|
||||
if (this.actionHandler) {
|
||||
this.actionHandler.destroy();
|
||||
}
|
||||
this.actionHandler = new ActionHandler(this.pageInfo);
|
||||
this.actionHandler = new ActionHandler(this.pageInfo.eventBus, this.settings, this.logger);
|
||||
this.actionHandler.init();
|
||||
|
||||
this.logger.log('info', 'debug', "[uw.js::setup] ActionHandler initiated.");
|
||||
|
@ -7,6 +7,7 @@ import Logger from '../Logger';
|
||||
import Settings from '../Settings';
|
||||
import ExtensionMode from '../../../common/enums/ExtensionMode.enum';
|
||||
import CommsClient from '../comms/CommsClient';
|
||||
import EventBus from '../EventBus';
|
||||
|
||||
if (process.env.CHANNEL !== 'stable'){
|
||||
console.info("Loading PageInfo");
|
||||
@ -51,6 +52,7 @@ class PageInfo {
|
||||
logger: Logger;
|
||||
settings: Settings;
|
||||
comms: CommsClient;
|
||||
eventBus: EventBus;
|
||||
videos: {videoData: VideoData, element: HTMLVideoElement}[] = [];
|
||||
//#endregion
|
||||
|
||||
@ -73,6 +75,8 @@ class PageInfo {
|
||||
this.extensionMode = extensionMode;
|
||||
this.readOnly = readOnly;
|
||||
|
||||
this.eventBus = new EventBus();
|
||||
|
||||
if (comms){
|
||||
this.comms = comms;
|
||||
}
|
||||
|
@ -90,6 +90,10 @@ class VideoData {
|
||||
|
||||
this.eventBus = new EventBus();
|
||||
|
||||
if (pageInfo.eventBus) {
|
||||
this.eventBus.setUpstreamBus(pageInfo.eventBus);
|
||||
}
|
||||
|
||||
this.setupStageOne();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user