API Documentation

This page contains the full documentation for Notifications.js. If you're new to the project you might prefer the getting started documentation before reading these docs.

Configuration Options

NotificationsJS comes with a number of configuration options, all of which are documented below. These are passed in when creating an instance of the library:

new Notifications({
  // options here

API Methods

Notifications.js methods

Once you've created an instance of the library, you have the following API methods available to you.

Message options

Each message is wrapped as an instance of the Message class that Notifications.js creates. When you call `getMessage` or define `onNewMessage`, you are given instances of Message. You should never create these directly, but instead call push, as documented above.

Each message has the following properties: