public sendByBeacon()

in src/services/report.ts [70:85]


  public sendByBeacon(data: any) {
    if (!this.url) {
      return;
    }
    if (typeof navigator.sendBeacon === 'function') {
      navigator.sendBeacon(
        this.url,
        new Blob([JSON.stringify(data)], {
          type: 'application/json'
        })
      );
      return;
    }

    this.sendByXhr(data);
  }