@bugsnag/web-worker
TypeScript icon, indicating that this package has built-in type declarations

7.22.7 • Public • Published

@bugsnag/web-worker

This package contains the web worker / service worker implementation of the BugSnag library.

Features and limitations

This early release offers basic functionality for web workers and service workers, with the intent to support Chrome extension development using manifest v3. Using this library, you will be able to:

  • notify errors from within service workers and web workers, including browser extensions
  • detect and automatically notify unhandled errors from service workers and web workers, excluding Chrome browser extensions due to limitations in the Chrome Runtime API.

Getting tarted

Installation

npm i @bugsnag/web-worker

Usage

import Bugsnag from "@bugsnag/web-worker"

Bugsnag.start({
    apiKey: YOUR_API_KEY
})

function myFunction() {
    try {
        // something that will throw an error
    } catch (err) {
        Bugsnag.notify(err)
    }
}

For further information check out the documentation.

License

This package is free software released under the MIT License. See LICENSE.txt for details.

Package Sidebar

Install

npm i @bugsnag/web-worker

Weekly Downloads

5,104

Version

7.22.7

License

MIT

Unpacked Size

352 kB

Total Files

8

Last publish

Collaborators

  • joshedney
  • ahmed_bugsnag
  • gingerbenw
  • bullmo
  • foygl
  • djskinner
  • tomlongridge
  • imjoehaines
  • twometresteve