Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

client-sw-ready-event

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

client-sw-ready-event

Client Side service worker ready event

  • 3.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Client Side Service Worker Ready Event

Intended to be used with sw-stream to register a service worker and provide the active service worker on a ready event

Usage

const SWcontroller = require('client-sw-ready-event/lib/sw-client.js')
const SwStream = require('sw-stream/lib/sw-stream.js')

const background = new SWcontroller({
  fileName: '/service-worker.js',
  // optional
  scope: '/',
})

background.on('ready', () => {
  let swStream = SwStream({
    serviceWorker: background.controller,
  })
 // do stuff
})

background.startWorker()

FAQs

Package last updated on 16 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc