addEventListeners() {
    window.removeEventListener('message', PostMessageListener.onNewTab);
    window.addEventListener('message', PostMessageListener.onNewTab);

    window.removeEventListener('onCustomChildMessage', this.customEventUnListener);
    window.addEventListener('onCustomChildMessage', ev => this.customEventUnListener(ev));

    window.removeEventListener('onChildUnload', this.onChildUnload);
    window.addEventListener('onChildUnload', ev => this.onChildUnload(ev));

    // Let children tabs know when Parent is closed / refereshed.
    window.onbeforeunload = () => {
      tabUtils.broadCastAll(PostMessageEventNamesEnum.PARENT_DISCONNECTED);
    };
  }
Attach postmessage, native and custom listeners to the window