@@ -253,17 +253,17 @@ export class StopGapWidget extends EventEmitter {
253253 if ( this . started ) return ;
254254 const driver = new StopGapWidgetDriver ( this . appTileProps . whitelistCapabilities || [ ] ) ;
255255 this . messaging = new ClientWidgetApi ( this . mockWidget , iframe , driver ) ;
256- this . messaging . addEventListener ( "preparing" , ( ) => this . emit ( "preparing" ) ) ;
257- this . messaging . addEventListener ( "ready" , ( ) => this . emit ( "ready" ) ) ;
258- this . messaging . addEventListener ( `action:${ WidgetApiFromWidgetAction . GetOpenIDCredentials } ` , this . onOpenIdReq ) ;
256+ this . messaging . on ( "preparing" , ( ) => this . emit ( "preparing" ) ) ;
257+ this . messaging . on ( "ready" , ( ) => this . emit ( "ready" ) ) ;
258+ this . messaging . on ( `action:${ WidgetApiFromWidgetAction . GetOpenIDCredentials } ` , this . onOpenIdReq ) ;
259259 WidgetMessagingStore . instance . storeMessaging ( this . mockWidget , this . messaging ) ;
260260
261261 if ( ! this . appTileProps . userWidget && this . appTileProps . room ) {
262262 ActiveWidgetStore . setRoomId ( this . mockWidget . id , this . appTileProps . room . roomId ) ;
263263 }
264264
265265 if ( WidgetType . JITSI . matches ( this . mockWidget . type ) ) {
266- this . messaging . addEventListener ( "action:set_always_on_screen" ,
266+ this . messaging . on ( "action:set_always_on_screen" ,
267267 ( ev : CustomEvent < IStickyActionRequest > ) => {
268268 if ( this . messaging . hasCapability ( MatrixCapabilities . AlwaysOnScreen ) ) {
269269 ActiveWidgetStore . setWidgetPersistence ( this . mockWidget . id , ev . detail . data . value ) ;
@@ -273,7 +273,7 @@ export class StopGapWidget extends EventEmitter {
273273 } ,
274274 ) ;
275275 } else if ( WidgetType . STICKERPICKER . matches ( this . mockWidget . type ) ) {
276- this . messaging . addEventListener ( `action:${ ElementWidgetActions . OpenIntegrationManager } ` ,
276+ this . messaging . on ( `action:${ ElementWidgetActions . OpenIntegrationManager } ` ,
277277 ( ev : CustomEvent < IWidgetApiRequest > ) => {
278278 // Acknowledge first
279279 ev . preventDefault ( ) ;
@@ -307,7 +307,7 @@ export class StopGapWidget extends EventEmitter {
307307
308308 // TODO: Replace this event listener with appropriate driver functionality once the API
309309 // establishes a sane way to send events back and forth.
310- this . messaging . addEventListener ( `action:${ WidgetApiFromWidgetAction . SendSticker } ` ,
310+ this . messaging . on ( `action:${ WidgetApiFromWidgetAction . SendSticker } ` ,
311311 ( ev : CustomEvent < IStickerActionRequest > ) => {
312312 // Acknowledge first
313313 ev . preventDefault ( ) ;
0 commit comments