window * @param payload * @param element */ public sendMessage(payload: IMessagePayload): Promise<any> { const message = this.formatPayload(payload) const deferred = createDeferred() this.createPromiseCache(message.trackingProperties.id, deferred) this.targetWindow.postMessage(message, '*') return deferred.promise }