

You use new notification to create notification and the parameters are pretty straight forward. Now here I am testing the permission level so it should be granted in order to continue or otherwise this next command won't have any effect. It will log the permission level as well which should be granted. The second function is to actually send a notification and this will also test for windows dot notification.

It has to have a function in here as the parameter so in this case I am just going to create a simple function that sends again the log to the console so that you can see that they have changed it so the perfect thing would be that it starts off saying default and then it goes and says granted.
MY PASSPORT FOR MAC 10.6.8 CODE
So if somebody is going to a browser other than Safari 6 right now then the code inside here won't work and the key thing here is that notification.request permission which will basically put up a dialog box that we will look at soon that will ask the user if the web page can send them notifications. This is testing windows dot notification tells you whether or not the browser has the ability. That's not part of the regular code of course. The third is granted which means they are going to allow notifications so notifications will work. The second is denied which means they have said no. So it what you are going to get when the user clicks this. The first one is the default which means the user has never done anything to enable to disable notification from this page. Now there are three different permission levels that you need to be concerned about. So the ask function basically it will send to the console here just the permission level so that I can see what the permission level is. Then I've got here at the bottom some very simple links here to trigger either one of these. The first is going to ask the user permission to send notification from this web page. Of course this would be in a dot JS file normally. It is just a matter of knowing the right Java Script to put in there. Using Java Script on your web pages you can use the Mountain Lion notifications feature along with Safari 6.
MY PASSPORT FOR MAC 10.6.8 HOW TO
On today's episode let's look how to implement notifications using Safari 6 and Java Script.

Video Transcript: Hi this is Gary with MacMost now. Check out MacMost Now 714: Sharing a Drive Between Mac and PC at YouTube for closed captioning and more options.
