mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
feat(tests): Make sure we add a single listener for iframeAPI events.
This commit is contained in:
@@ -41,6 +41,10 @@ export default class IframeAPI extends BasePageObject {
|
||||
addEventListener(eventName: string) {
|
||||
return this.participant.execute(
|
||||
(event, prefix) => {
|
||||
// we want to add it once as we use static .test[event] to store the last event
|
||||
if (window.jitsiAPI.listenerCount(event) > 0) {
|
||||
return;
|
||||
}
|
||||
console.log(`${new Date().toISOString()} ${prefix}iframeAPI - Adding listener for event: ${event}`);
|
||||
window.jitsiAPI.addListener(event, evt => {
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user