alexgibson/notify.js — pull request #25 by dotDeeka (2014-08-29 20:56:18+00:00)
Title: Update Notify.needsPermission to false after the user approves permissio...

...n to send notifications

We are building a single page app. In our code we have a check for Notify.needsPermission before we create a new Notify object. When the end user allows notifications Notify.needsPermission remains true until the next page refresh. Since we are building a SPA it could be a while until that happens.

This pull request is to update Notify.needsPermission to false when permission is granted, and the corresponding unit test. Thanks. Any feedback on how to achieve this in a different way is of course welcome.