High-level events and utilities for events in Web Extensions
npm install webext-events[badge-gzip]: https://img.shields.io/bundlephobia/minzip/webext-events.svg?label=gzipped
[link-bundlephobia]: https://bundlephobia.com/result?p=webext-events
> High-level events and utilities for events in Web Extensions
``sh`
npm install webext-events
Or download the standalone bundle to include in your manifest.json.
This package exports various utilities, just import what you need.
- onContextInvalidated - Fires in content scripts when the extension is disabled, updated or reloaded.
- onExtensionStart - Fires when the extension starts or is enabled. This is what yuou thought chrome.runtime.onStartup was for..addEventListener
- oneEvent - Creates a promise that resolves when an event is received.
- addListener - Like but with a signal` to remove the listener.
- webext-tools - Utility functions for Web Extensions.
- webext-content-scripts - Utility functions to inject content scripts in WebExtensions.
- More…
MIT © Federico Brigante