Showing web push notifications from Chrome, Safari, and Firefox
OneSignal is a free push notification service for web and mobile apps.
This SDK allows your site's visitors to receive push notifications from you. Send visitors custom notification content, target specific users, and send automatically based on triggers.
View our documentation to get started.
Please reference the OneSignal SDK on your webpage via our CDN URL (listed in our setup documentation) instead of copying the source into another file. This is because our SDK updates frequently for new features and bug fixes.
+-- assets/
Sources for web SDK. entry.js
is the entry point that requires other files.
+-- src/
Sources for web SDK. entry.js
is the entry point that requires other files.
+-- test/
Sources for web SDK tests. entry.js
is the entry point that requires other files.
+-- dist/
Contains the production (minified & mangled) and development versions of the transpiled web SDK as well as their separate source map .map
files. Also contains the OneSignalSDKTests.js file, which is the ES6-transpiled-to-ES5 tests from all the test/
source files.
git clone [email protected]:one-signal/OneSignal-Website-SDK.git
npm install
npm install -g gulp webpack
(installsgulp
andwebpack
globally for use)gulp
The src/
and test/
directories are watched and automatically re-transpiled when changed. The compiled SDK go to dist/
. The compiled test sources go to dist/OneSignalSDKTests.js
.