sw

package
v0.0.0-...-323ef38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package sw 提供 service worker 的支持

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceWorker

type ServiceWorker struct {
	// contains filtered or unexported fields
}

ServiceWorker SW 功能的管理

func New

func New() *ServiceWorker

New 声明新的 ServiceWorker 变量

func (*ServiceWorker) Add

func (sw *ServiceWorker) Add(ver string, paths ...string)

Add 添加某一版本下的缓存文件路径。

func (*ServiceWorker) Bytes

func (sw *ServiceWorker) Bytes() []byte

Bytes sw.js 的实际内容

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL