Bind the on messaging iframe for easier access in hangup/join handling

This commit is contained in:
Gigiaj 2025-05-28 16:08:01 -05:00
parent 39b20c7cc7
commit 42252829c6

View file

@ -90,6 +90,8 @@ export class SmallWidget extends EventEmitter {
public url?: string; public url?: string;
public iframe: HTMLElement | null;
private type: string; // Type of the widget (e.g., 'm.call') private type: string; // Type of the widget (e.g., 'm.call')
private readUpToMap: { [roomId: string]: string } = {}; // room ID to event ID private readUpToMap: { [roomId: string]: string } = {}; // room ID to event ID
@ -123,7 +125,7 @@ export class SmallWidget extends EventEmitter {
true, true,
this.roomId this.roomId
); );
this.iframe = iframe;
this.messaging = new ClientWidgetApi(this.mockWidget, iframe, driver); this.messaging = new ClientWidgetApi(this.mockWidget, iframe, driver);
// Emit events during the widget lifecycle // Emit events during the widget lifecycle