Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "src/serviceWorker"

Index

Type aliases

Config

Config: object

Type declaration

  • Optional onSuccess?: undefined | function
  • Optional onUpdate?: undefined | function

Variables

Const isLocalhost

isLocalhost: boolean = Boolean(window.location.hostname === 'localhost' ||// [::1] is the IPv6 localhost address.window.location.hostname === '[::1]' ||// 127.0.0.1/8 is considered localhost for IPv4.window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))

Functions

checkValidServiceWorker

  • checkValidServiceWorker(swUrl: string, config?: Config): void

register

  • register(config?: Config): void

registerValidSW

  • registerValidSW(swUrl: string, config?: Config): void

unregister

  • unregister(): void

Generated using TypeDoc