async registerSync()

in workbox-v4.3.1/workbox-background-sync.dev.js [655:667]


    async registerSync() {
      if ('sync' in registration) {
        try {
          await registration.sync.register(`${TAG_PREFIX}:${this._name}`);
        } catch (err) {
          // This means the registration failed for some reason, possibly due to
          // the user disabling it.
          {
            logger_mjs.logger.warn(`Unable to register sync event for '${this._name}'.`, err);
          }
        }
      }
    }