/*
 * @Author: thy
 * @Date: 2023-10-26 14:56:41
 * @LastEditors: thy
 * @LastEditTime: 2023-10-31 09:28:26
 * @Description: file content
 * @FilePath: \dsk-operate-ui\src\utils\postMessageBridge\bridge\index.js
 */


class PostMessageBridge {
  // 当前系统
  _currenySystem = null;
  // 目标系统
  _targetSystem = null;
  // 目标域
  _targetOriginUrl = null;
  // 事件调度中心
  _eventHandlers = new Map();
  /**
   * 
   * @param {{
   * currenySystem : Window || undefined;
   * targetSystem : Window || undefined;
   * targetOriginUrl : string || undefined;
   * }} options 
   */
  constructor(options) {
    this._currenySystem = options.currenySystem;
    this._targetSystem = options.targetSystem;
    this._targetOriginUrl = options.targetOriginUrl || "*";
  }

  /**
   * 订阅消息
   * @param {{
   * id : string;
   * method : string;
   * params : object;
   * }} messageEvent 
   */
  receiveMessage(messageEvent) {
    
  }
}