2

I am planning on adding the Notifications API functionality to a web app I am building.

I took a look at the example from the MDN site:

function spawnNotification(theBody, theIcon, theTitle) {
    var options = {
        body: theBody,
        icon: theIcon
    };
    var n = new Notification(theTitle, options);
}

It allows the URL of an image (icon) to be specified as the icon in the notification popup box. Since I am using and , is there a way that I can use one of the images from the icon font as the icon for the notification?

Sᴀᴍ Onᴇᴌᴀ
  • 8,218
  • 8
  • 36
  • 58
Eric
  • 6,563
  • 5
  • 42
  • 66

1 Answers1

0

I tried wrapping up the html into a data URI using the technique described in this answer but that didn't appear to work so it seems that there is no option using the Notifications API.

You could consider using the Bootstrap Notify plugin instead, which appears to support a class for a font icon in the options.

Sᴀᴍ Onᴇᴌᴀ
  • 8,218
  • 8
  • 36
  • 58