This is a proposed fix for this issue. I'm putting this in a pull request because I do not have enough information about Notifications to know whether this is the best course of action or not. The proposed actions are these:
Rename Komanda.notification to Komanda.Notification. Minor, the capitalization was just bothering me, since it is a constructor, after all.
Rather than check if window.Notification is present, check instead that Komanda.Notification is. This is for a couple of reasons, the main being that if something is preventing notifications from working despite their being present, we don't want to expose them. Further, we may eventually want to use our own Notification system with a similar API so why not allow that possibility.
On Windows, where node-webkit appears to crash on the deferred execution of the notification (not the construction), do not enable Komanda.Notification.
This is a proposed fix for this issue. I'm putting this in a pull request because I do not have enough information about Notifications to know whether this is the best course of action or not. The proposed actions are these:
Komanda.notification
toKomanda.Notification
. Minor, the capitalization was just bothering me, since it is a constructor, after all.window.Notification
is present, check instead thatKomanda.Notification
is. This is for a couple of reasons, the main being that if something is preventing notifications from working despite their being present, we don't want to expose them. Further, we may eventually want to use our own Notification system with a similar API so why not allow that possibility.Komanda.Notification
.