Options
All
  • Public
  • Public/Protected
  • All
Menu

运行在 ServiceWorker 线程中的代码

Hierarchy

Index

Constructors

Properties

lifecycleHooks: LifecycleHooks
lifecycles: string[]
plugins: { global: Record<string, ServiceWorkerPlugin>; scope: Record<string, Record<string, ServiceWorkerPlugin>> }

Type declaration

Methods

  • callLifecyleMiddlewares<Context>(scopePath: string | string[], lifecycle: Lifecycle, context?: Context): Promise<void>
  • Type parameters

    • Context: BaseContext

    Parameters

    • scopePath: string | string[]
    • lifecycle: Lifecycle
    • Optional context: Context

    Returns Promise<void>

  • getScopePathsOfVisableClients(): Promise<string[]>
  • 多个窗口打开时,会存在多个 client 为 visibilityState = true 获取这些 Client 的 url 计算出 scopePath

    Returns Promise<string[]>

  • listen(): void
  • 监听 ServiceWorker 各种生命周期事件,焊接到 GlacierJS 对应事件的异步队列

    Returns void

  • uninstall(): Promise<void>

Generated using TypeDoc