A client-side JavaScript SDK for web push notifications supporting Chrome, Firefox, and Safari. Published to npm as web-push-notifications and distributed via CDN.
Install dependencies:
npm installStart the local dev server:
npm startRuns webpack-dev-server on https://localhost:8003 with the CDN build configuration.
npm run build # development build
npm run build:prod # production build (minified)
npm run release # production build + zip packagenpm run check:types # TypeScript type-check
npm run check:lint # ESLint
npm run lint:fix # auto-fix ESLint issues- Provides the Pushwoosh Web Push SDK for integrating browser push notifications into websites
- Handles push subscription management across Chrome, Firefox, and Safari (including legacy Safari APNs)
- Includes a Service Worker for receiving and displaying push notifications
- Ships UI widgets: subscription popup, subscription button, subscription prompt, and in-app inbox
- Communicates with the Pushwoosh backend API for device registration, event tracking, and inbox messages
- Published as:
- CDN:
https://cdn.pushwoosh.com/webpush/v3/pushwoosh-web-notifications.js - npm:
web-push-notifications - GitHub: Pushwoosh/web-push-notifications
- CDN:
<script src="//cdn.pushwoosh.com/webpush/v3/pushwoosh-web-notifications.js" async></script>
<script>
var Pushwoosh = Pushwoosh || [];
Pushwoosh.push(['init', {
apiToken: 'YOUR_DEVICE_API_TOKEN',
applicationCode: 'XXXXX-XXXXX',
defaultNotificationTitle: 'Pushwoosh',
autoSubscribe: true
}]);
</script>- TypeScript, Webpack 5, Babel
- No runtime framework dependencies (vanilla JS/TS)
@pushwoosh/logger(internal)