()
| 50 | #loginTimeout = null; |
| 51 | |
| 52 | constructor() { |
| 53 | addIntentHandler(this.onIntentReceiver.bind(this)); |
| 54 | loginEvents.addListener(() => { |
| 55 | clearTimeout(this.#loginTimeout); |
| 56 | for (const callback of this.#loginCallbacks) { |
| 57 | callback.resolve(); |
| 58 | } |
| 59 | this.#loginCallbacks.clear(); |
| 60 | }); |
| 61 | document.addEventListener("resume", () => { |
| 62 | clearTimeout(this.#loginTimeout); |
| 63 | this.#loginTimeout = setTimeout(() => { |
| 64 | for (const callback of this.#loginCallbacks) { |
| 65 | callback.reject("Login timed out"); |
| 66 | } |
| 67 | |
| 68 | this.#loginCallbacks.clear(); |
| 69 | }, 1000); |
| 70 | }); |
| 71 | } |
| 72 | |
| 73 | async onIntentReceiver(event) { |
| 74 | try { |
nothing calls this directly
no test coverage detected