Test Notification

The process is, test if Notification is supported, see if the user has either granted, denied or are in a default state in terms of notification permissions. Ask for permissions if not granted. Lastly process the sending of the Notification.



# CoffeeScript Code
# Instantiate Notification Class
notification = new App.Classes.Notification

# Create Notification in JavaScript
notification.create "Hello",
    body : "Body of the Notification"
    tag  : "CodeBlender"
    icon : "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRWYGX6PCYhae1Sm6rhkA_UB9lLCTczhtx4mDa6ghPcEHIOwCHL2A"

Resources Useful websites and tutorials