| 507 | { destroyed: boolean; request: (cancelable: boolean) => boolean } |
| 508 | > = [] |
| 509 | class Watcher extends EventTarget { |
| 510 | destroyed = false |
| 511 | constructor() { |
| 512 | super() |
| 513 | made.push(this) |
| 514 | } |
| 515 | destroy() { |
| 516 | this.destroyed = true |
| 517 | } |
| 518 | request(cancelable: boolean) { |
| 519 | const cancel = new Event("cancel", { cancelable }) |
| 520 | this.dispatchEvent(cancel) |
| 521 | if (cancel.defaultPrevented) return true |
| 522 | this.destroyed = true |
| 523 | this.dispatchEvent(new Event("close")) |
| 524 | return false |
| 525 | } |
| 526 | } |
| 527 | const userAgent = platform.android |
| 528 | ? "Mozilla/5.0 (Linux; Android 14) Chrome/130.0" |
| 529 | : navigator.userAgent |
no outgoing calls