isAvailable: boolean;
msgId: number;
- messages: {[msgid:number]: HatchMessage};
+ messages: {[msgid: number]: HatchMessage};
constructor() {
this.isAvailable = null;
this.handleResponse(event.data);
}
- });
+ });
return this.isAvailable = true;
}
// Handle the data sent back to the browser from Hatch.
handleResponse(data: any) {
- const msg = this.messages[data.msgid];
+ const msg = this.messages[data.msgid];
if (!msg) {
console.warn(`No Hatch request found with ID ${data.msgid}`);
return;