I'm working on deploying web push for notifications. Everything is working great, but I've come to understand that some browsers do not support Notification.image
, or at least do not display said image. However, they all do seem to support Notification.icon
, and Firefox actually uses Notification.icon
to display an image in their rich push example.
I would ideally like to use Notification.image
when supported, but fallback to Notification.icon
when not. However, it's not so simple as just supplying an image for both, as then on browsers that do support displaying Notification.image
, you'll get it twice.
I'm wondering if anyone knows of a way to detect support. Unfortunately, even browsers that don't support display still know that Notification.image
is a thing that exists, so basic feature detection is out. I'd also like to avoid UA detection if at all possible, as keeping up with supported UAs would likely be a nightmare. Anyone know of anything I'm missing, or how have you handled this in your own experience?