src/store/Store.js
/**
   * Dispatch an action to the background using messaging passing
   * @param  {object} data The action data to dispatch
   * @return {Promise}     Promise that will resolve/reject based on the action response from the background
   */
Dispatch an action to the background using messaging passing
@param  {object} data The action data to dispatch
@return {Promise}     Promise that will resolve/reject based on the action response from the background
Dispatch an action to the background using messaging passing @param { object } data The action data to dispatch @return { Promise } Promise that will resolve / reject based on the action response from the background
dispatch(data) {
    return new Promise((resolve, reject) => {
      safari.self.tab.dispatchMessage(
        DISPATCH_TYPE,
        {
          type: DISPATCH_TYPE,
          portName: this.portName,
          payload: data
        }
      )
    }
  )}
dispatch ( data ) { return new Promise ( ( resolve , reject ) => { safari . self . tab . dispatchMessage ( DISPATCH_TYPE , { type : DISPATCH_TYPE , portName : this . portName , payload : data } ) } ) }
Dispatch an action to the background using messaging passing
 @param  {object} data The action data to dispatch
 @return {Promise}     Promise that will resolve/reject based on the action response from the background
Dispatch an action to the background using messaging passing @param { object } data The action data to dispatch @return { Promise } Promise that will resolve / reject based on the action response from the background