Pushwoosh lite WebSDK
npm install web-push-notifications-liteUsers subscribe to push notifications through the Pushwoosh endpoint (https://
``html`
bash
npm install web-push-notifications-lite --save
`2. Integrate the WebSDK Lite
$3
Add the following script to your website’s html:
`html
`where
* pw_application_code – the app code of your app in Pushwoosh,
* pw_autosubscribe – the parameter to enable automatic opening of the subscription window after the script is launched.
To initialize the SDK manually, add the onload parameter to the script as follows:
`html
` $3
`ecmascript 6
import {instance as pushwooshLite} from 'web-push-notifications-lite';
pushwooshLite.init('####-####', true);
``* klass – a class of PushwooshLite;
* instance – the instance of the PushwooshLite class to use it as a singleton;
* LOCAL_STORAGE_ALLOW_NOTIFICATION_FLAG – a key to flag user interaction with the SDK in localStorage.