trisquel-icecat/icecat/dom/push/test/xpcshell/broadcast_handler.sys.mjs

12 lines
274 B
JavaScript

export var broadcastHandler = {
reset() {
this.notifications = [];
this.wasNotified = new Promise(resolve => {
this.receivedBroadcastMessage = function () {
resolve();
this.notifications.push(Array.from(arguments));
};
});
},
};